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: EPICS alarming on VAL != X
From: "Johnson, Andrew N." <[email protected]>
To: Jameson Graef Rollins <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Sat, 19 Jul 2014 04:43:42 +0000
Hi Jamie,

This seems to be a rather unusual case. It's easy to implement this behavior using a calc record to do the equality comparison, but equality is actually a fairly rare comparison to use for floating point values (other than zero). If X is really an integer you could use longin or longout records instead, you just have to set the LOW and HIGH alarm levels to one either side of X and HYST to zero. If X is not an integer and is read from an ADC say, you could calculate the ADC values in engineering units adjacent to X and use them for the LOW and HIGH fields of your ai/ao record. If X really is a double value you could even calculate the next higher and lower double values and use them, but you need an understanding of IEEE floating point to do that properly.

HTH,

- Andrew

-- 
Sent from my iPad

> On Jul 18, 2014, at 19:10, "Jameson Graef Rollins" <[email protected]> wrote:
> 
> Hi, folks.  I've been wondering about this question for a while, and
> have therefore assumed it's impossible, but I thought I would ask here
> in case there's something I don't know about...
> 
> Is it possible to set an EPICS AI or AO record to alarm on being NOT
> EQUAL to a set value?  In other words, I don't want to set a range, I
> want on alarm if and only if .VAL != X.
> 
> As far as I can tell such a thing is not possible, which has always
> seemed odd to me.  If it's only possible to set a range for alarms
> (HIGH/LOW, HIHI/LOLO, etc.) then it's actually impossible to cover the
> case where you want a record to take on only a specific value.
> 
> I guess the problem is that the alarms activate on equality (VAL == LOW,
> VAL == HIGH).  If instead the alarm conditions were:
> 
>  VAL == LOW
>  VAL >= HIGH
> 
> then we could cover the equality case by setting LOW = HIGH = X, in
> which case we would have an alarm if VAL != X.
> 
> Is it truly impossible to achieve this currently?
> 
> jamie.


Replies:
Re: EPICS alarming on VAL != X Jameson Graef Rollins
References:
EPICS alarming on VAL != X Jameson Graef Rollins

Navigate by Date:
Prev: EPICS alarming on VAL != X Jameson Graef Rollins
Next: Re: EPICS alarming on VAL != X Jameson Graef Rollins
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: EPICS alarming on VAL != X Jameson Graef Rollins
Next: Re: EPICS alarming on VAL != X Jameson Graef Rollins
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 ·