EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: RE: Subroutine invoked only when PV limit exceeded?
From: "Arnold, Ned D." <[email protected]>
To: "Poff, Mark A" <[email protected]>, "Johnson, Andrew N." <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 28 Jul 2014 18:46:11 +0000
If you don't mind adding another record, a calcout record could do the condition testing on SEVR and then process the subroutine record when needed.  It has options like "When Zero", "Transition to Zero", "Transition to non-zero", etc.  This keeps the logic in the database ... if you prefer ...

  Ned

________________________________________
From: [email protected] [[email protected]] on behalf of Poff, Mark A [[email protected]]
Sent: Monday, July 28, 2014 01:35 PM
To: Johnson, Andrew N.; [email protected]
Cc: Poff, Mark A
Subject: RE: Subroutine invoked only when PV limit exceeded?

Thanks, Andrew, I'll try that.

-Mark

-----Original Message-----
From: Andrew Johnson [mailto:[email protected]]
Sent: Monday, July 28, 2014 2:26 PM
To: Poff, Mark A; [email protected]
Subject: Re: Subroutine invoked only when PV limit exceeded?

Hi Mark,

On 07/28/2014 01:01 PM, Poff, Mark A wrote:
> Andrew, thanks very much for that suggestion.  I modified the sub
> record as follows and it seems to work:
> record("MY_PV_sub")
> {
> field(SDIS, "MY_PV.SEVR")
> field(DISV, "0")
> field(INPA, "MY_PV")
> field(SNAM, "MY_PV_subroutine")
> }
>
> This prevents the subroutine from being called when the Severity is
> zero
> - which is a significant improvement - but if the PV value bounces
> around while in the HIHI range (for example), the subroutine is called
> each time.  What I was hoping for is a setup which calls the
> subroutine only once when an alarm state is entered, and isn't called
> again until the alarm state is exited/re-entered.  For example,
> perhaps the subroutine, when called, could examine the current
> severity level and change the DISV value on the fly to a different
> severity level...but that might be a pretty ugly way to do it.  Do you have any thoughts?

You should look at the HYST field of the longin record, which was added to prevent alarm chattering (it specifies a dead-band that the value must exceed before the record will exit back out of the current alarm level). Then try removing the foward link from MY_PV and make the SDIS link in MY_PV_sub a CP link, so it will process the MY_PV_sub record only when a monitor event occurs because the value of MY_PV.SEVR has changed.

I think a combination of those two should get you what you want.

- Andrew

--
Advertising may be described as the science of arresting the human intelligence long enough to get money from it. -- Stephen Leacock



Replies:
RE: Subroutine invoked only when PV limit exceeded? Poff, Mark A
References:
Subroutine invoked only when PV limit exceeded? Poff, Mark A
Re: Subroutine invoked only when PV limit exceeded? Andrew Johnson
RE: Subroutine invoked only when PV limit exceeded? Poff, Mark A
Re: Subroutine invoked only when PV limit exceeded? Andrew Johnson
RE: Subroutine invoked only when PV limit exceeded? Poff, Mark A

Navigate by Date:
Prev: RE: Subroutine invoked only when PV limit exceeded? Poff, Mark A
Next: RE: Subroutine invoked only when PV limit exceeded? Poff, Mark A
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Subroutine invoked only when PV limit exceeded? Poff, Mark A
Next: RE: Subroutine invoked only when PV limit exceeded? Poff, Mark A
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·