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: NaN and analog records
From: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Thu, 6 Nov 2014 14:32:25 +0100
On Wednesday 05 November 2014 09:48:24 Andrew Johnson wrote:
> On 11/05/2014 05:59 AM, Benjamin Franksen wrote:
> > As it turned out (I did not observe the failure myself, and perhaps
> > I
> > misunderstood my colleague) the client wrote the NaN directly to the
> > A field of the subroutine record with no intervening ao record.
> > Using an ao record which forwards its value via OUT link to the
> > subroutine record's A and setting its IVOA to "Dont' drive outputs"
> > would have prevented the problem. Also, the subroutine record
> > probably *did* become INVALID, but this wasn't checked by
> > subsequent records which monitored the subroutine's VAL field.
>
> Note that just having a NaN in one of the input fields of a sub record
> may not result in the record going INVALID, only the VAL field is
> checked.

Yes. It may make sense to to check the input fields, too, but I am not
certain this is what we want in all cases, so there should be the
possibility to disable this. A sub, calc, or calcout record may not use
all its inputs every time (perhaps depending on the values of other
fields) and such unused inputs should not make the record INVALID.

> > One loop hole remains in the ai record: it checks for NaN only
> > inside
> > the convert procedure. Thus, writing a NaN directly to the ai
> > record's VAL will not cause the record to become INVALID (assuming
> > INP is empty). This is perhaps a somewhat non-idiomatic use of an
> > ai record, but there is nothing to prevent it being used like that,
> > so I guess the check for NaN should be made directly inside
> > process() like for the ao record.
> I'm not disagreeing with you and I haven't looked at the code since
> reading that, but I would point out that the ai record doesn't have
> anything like the IVOA/IVOV fields of the ao record, so the NaN
> detection is probably not as important.

The point is that other records may request the value with a MS-link, so
the INVALID state gets propagated, which in turn may prevent bad things
from happening (if these records have IVOA set appropriately).

Cheers
Ben
--
"Make it so they have to reboot after every typo." ― Scott Adams

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


References:
NaN and analog records Benjamin Franksen
Re: NaN and analog records Benjamin Franksen
Re: NaN and analog records Andrew Johnson

Navigate by Date:
Prev: Re: Record processing during iocInit? Jörn Wüstenfeld
Next: RE: Record processing during iocInit? Mark Rivers
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: NaN and analog records Andrew Johnson
Next: support for NIKHEF Hall probes Pierrick Hanlet
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 ·