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  2014  2015  2016  2017  2018  <20192020  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  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: PINI set to YES but no VAL field in the record definition
From: Mark Rivers via Tech-talk <tech-talk@aps.anl.gov>
To: Hinko Kocevar <Hinko.Kocevar@esss.se>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 22 Aug 2019 12:00:15 +0000
> What happens if the record (I.e. longout) has PINI set to YES, but there is no VAL field set? Is 0 used as initial value?


Yes, my understanding is that any record field that does not have an "initial" value in its dbd file is set to 0.  For example this is the code for the ao record EOFF and ESLO fields in the dbd file in base 7.0.3.


    field(EOFF,DBF_DOUBLE) {
        prompt("EGU to Raw Offset")
        promptgroup("60 - Convert")
        pp(TRUE)
        interest(2)
    }
    field(ESLO,DBF_DOUBLE) {
        prompt("EGU to Raw Slope")
        promptgroup("60 - Convert")
        pp(TRUE)
        interest(2)
        initial("1")
    }

So ESLO is explicitly set to 1, but EOFF is implicitly set to 0.


> Does it make sense to have PINI=YES in such cases?

I am sure there are many existing cases where the database developer is relying on the initial value being implicitly 0 and using PINI=YES.

Also, even if the VAL field it not set in the dbd file or the database file, it could be set by autosave restore in iocInit.

Mark


________________________________
From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on behalf of Hinko Kocevar via Tech-talk <tech-talk@aps.anl.gov>
Sent: Wednesday, August 21, 2019 10:40 PM
To: tech-talk@aps.anl.gov
Subject: PINI set to YES but no VAL field in the record definition

What happens if the record (I.e. longout) has PINI set to YES, but there is no VAL field set? Is 0 used as initial value? Does it make sense to have PINI=YES in such cases?

Thanks,
Hinko

References:
PINI set to YES but no VAL field in the record definition Hinko Kocevar via Tech-talk

Navigate by Date:
Prev: PINI set to YES but no VAL field in the record definition Hinko Kocevar via Tech-talk
Next: RE: CameraLink and ADPCO Mark Rivers via Tech-talk
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  <20192020 
Navigate by Thread:
Prev: PINI set to YES but no VAL field in the record definition Hinko Kocevar via Tech-talk
Next: RE: CameraLink and ADPCO Mark Rivers via Tech-talk
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  <20192020 
ANJ, 22 Aug 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·