EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: calc record question
From: Maren Purves <[email protected]>
Cc: [email protected]
Date: Mon, 28 Feb 2005 11:53:48 -1000
Thanks to Marty and Paul.

Maren
(won't be able to test this for another week - 10 days)

Paul Sichta wrote:
The Calcout record (and some other records) have IVOA and IVOV fields that force a user-specified output value if the record's status (or INP links if MS is specified) goes to INVALID. So, you could follow Marty's concept but get away with only one new record.

-ps


----- Original Message ----- From: "Marty Kraimer" <[email protected]> To: "Maren Purves" <[email protected]> Cc: <[email protected]> Sent: Monday, February 28, 2005 8:13 AM Subject: Re: calc record question




Maren Purves wrote:

Hi all,

I need/partly have the following application:

An IOC provides a (floating point, if that matters) number that
depends on something in this IOC to another IOC where it needs
to be added into a calc record. We do this in other places, and
in itself it isn't a problem. The question I have is:

What happens if the first IOC is switched off?
(The number it contributes should be switched to 0.0 before it
is turned off. This IOC may be switched off for months at a
time.)

Will the calc record treat the non-existing input as a 0?
Will it also do so when it is rebooted?

Thanks,

Maren
(trying to avoid putting in a switch)




The calc record will continue to use the value it last obtained or 0.0 if it never got a value from the other ioc. If you specify MS on the link the calc record will go into alarm if the other IOC is down.

Here is a way to do what you require. Create the following two additional records

record(ai,"<actualLink>") {
   field(INP,"<pvInOtherIOC> CP MS")
}
record(calc,"<checkStatus>") {
   field(INPA,"<actualLink> ")
   field(INPB,"<actualLink>.SEVR")
    #SEVR=3 means INVALID_ALARM
   field(CALC,"(B=3)?0.0:A")  }


Than have your original calc record link to <checkStatus> instead of <pvInOtherIOC>, e.g.
field(INP<X>,"<checkStatus> PP")


Perhaps someone can think of a more clever way that does not require two additional records.

Marty Kraimer






References:
calc record question Maren Purves
Re: calc record question Marty Kraimer
Re: calc record question Paul Sichta

Navigate by Date:
Prev: Re: calc record question Paul Sichta
Next: Bad URL for the SLAC guest house. Chestnut, Ronald P.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: calc record question Paul Sichta
Next: Twos compliment and Ai Records Gavin Smith
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·