On Saturday 19 July 2014 10:45:39 Jameson Graef Rollins wrote:
> On Fri, Jul 18 2014, "Johnson, Andrew N." <[email protected]> wrote:
> > 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.
>
> Hi, Andrew. Thanks so much for the response.
>
> I imagine we are doing some a bit non-standard. We use ai records for
> system parameters that need to take on non-integer values, such as
> digital gains. As you suggest, we could calculate the next
> higher/lower double values and set the alarms to those, but that
> requires more intermediate work when setting the alarms.
>
> It seems, though, that this case could be easily covered if either the
> HIGH or LOW alarm were changed to strictly greater/less than the
> alarm value. Can you think of some reason this behavior would not be
> desired?
Why don't you just set DRVL=DRVH=<the desired value>. In that case the
record simply can't take on any other value. No need to even think about
alarms for situations that can never arise...
Cheers
Ben
--
"Make it so they have to reboot after every typo." â Scott Adams
Attachment:
signature.asc
Description: This is a digitally signed message part.
- Replies:
- Re: EPICS alarming on VAL != X Jameson Graef Rollins
- Re: EPICS alarming on VAL != X Dirk Zimoch
- References:
- EPICS alarming on VAL != X Jameson Graef Rollins
- Re: EPICS alarming on VAL != X Johnson, Andrew N.
- Re: EPICS alarming on VAL != X Jameson Graef Rollins
- Navigate by Date:
- Prev:
Re: EPICS on VxWorks6.9 Dirk Zimoch
- Next:
RE: EPICS on VxWorks6.9 Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: 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
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|