EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Initial STAT and SEVR for soft ai and ao records
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Thu, 3 Mar 2005 12:42:08 +0100
On Wednesday 23 February 2005 19:18, you wrote:
> On Wednesday 23 February 2005 14:40, Marty Kraimer wrote:
> > Benjamin Franksen wrote:
> > >On Wednesday 16 February 2005 20:42, Marty Kraimer wrote:
> > >>If all that is desired to to make the record not be in alarm
> > >> after initialization then just set
> > >>
> > >>    field(SEVR,"NO_ALARM")
> > >>    field(STAT,"NO_ALARM")
> > >>    field(UDF,"0")
> > >>
> > >>In the record instance definition.
> > >
> > >However, at least with 3.13.9 this doesn't work. The record (a bo)
> > > is still UDF/INVALID after booting.
> > >
> > In both 3.13 and 3.14 dbCommon.dbd has the definitions:
> >
> >         field(STAT,DBF_MENU) {
> >                 prompt("Alarm Status")
> >                 special(SPC_NOMOD)
> >                 menu(menuAlarmStat)
> >                 initial("UDF")
> >         }
> >         field(SEVR,DBF_MENU) {
> >                 prompt("Alarm Severity")
> >                 special(SPC_NOMOD)
> >                 menu(menuAlarmSevr)
> >                 initial("INVALID")
> >         }
> >
> > Thus the defaults are STAT=UDF and SEVR=INVALID.
>
> Oops. I inferred what I said about the defaults from the output of
> dbst, which threw your STAT/SEVR definitions out of my db file.

And it did so because fields STAT and SEVR have no promptGroup 
attributes, thus are not recognized as DCT fields and thus get 
eliminated by dbDumpRecord from dbStaticLib. This routine has a 3rd 
argument 'level', which is documented as follows

 0 - write only prompt fields that are different from the default values
 1 - write only the fields which are prompt fields
 2 - write values of all fields

So there is no way to write all fields that that are different from the 
default values, regardless of whether they are prompt fields or not.

Note that dbst is used to eliminate default values from the db file, 
which is very useful for capfast generated db files. Thus, one cannot 
use level=2 to circumvent this problem.

There are two solutions:

(1) Add promptGroup attributes to the field definitions of STAT and 
SEVR, effectively making them into DCT fields.

(2) Split argument 'level' into two boolean arguments 
'non_prompt_fields' and 'non_default_fields'. Or add a 4th level

 3 - write values of all fields that are different from the default 
values

I prefer solution (1), because it's the least intrusive and easy to 
realize. I think we'll make this change locally.

Cheers,
Ben

Replies:
Re: Initial STAT and SEVR for soft ai and ao records Ralph Lange
References:
RE: Initial STAT and SEVR for soft ai and ao records Mark Rivers
Re: Initial STAT and SEVR for soft ai and ao records Marty Kraimer
Re: Initial STAT and SEVR for soft ai and ao records Benjamin Franksen

Navigate by Date:
Prev: SLAC EPICS Meeting Website Ready Chestnut, Ronald P.
Next: Re: Initial STAT and SEVR for soft ai and ao records Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Initial STAT and SEVR for soft ai and ao records Benjamin Franksen
Next: Re: Initial STAT and SEVR for soft ai and ao records Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·