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: Marty Kraimer <[email protected]>
To: Maren Purves <[email protected]>
Cc: [email protected]
Date: Mon, 28 Feb 2005 07:13:15 -0600


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




Replies:
Re: calc record question Paul Sichta
References:
calc record question Maren Purves

Navigate by Date:
Prev: Virus Found in message "Paris Hilton, pure!" hostmaster
Next: Re: command to set IOC time Marty Kraimer
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: calc record question Maren Purves
Next: Re: calc record question Paul Sichta
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 ·