J. Frederick Bartlett wrote:
Recently I was adding some new records to our name/value server IOC and I
noticed an unexpected behavior. My new records, which are of type longin and
ai, are used to supply system-wide values, i.e. firmware version numbers for
comparison with hardware, computational constants, etc., for the rest of the
control system. The records are initialized by placing a constant value in
the INP field of the record definition text.
As one would expect, after initialization the UDF field for these records
is zero, indicating that the VAL field has had a value assigned at some
point in the record's existence. What I did not expect was that the SEVR
field is set to INVALID and the STAT field to UDF. I would have expected
that, if you are going to bother to set the UDF field to zero, consistency
would dictate that the SEVR and STAT fields would be given the value
NO_ALARM, just as it would be when the VAL field is set by a CA put
operation. Is this behavior intentional and, if so, why?
I also discovered that, for the stringin record, this technique of setting
an initial value by placing a constant -- in this case a string constant --
in the INP field does not work at all. Is there a corresponding method for
initializing the VAL field of a stringin record?
Just initialize the VAL field directly. Also specify PINI.
record(stringin,"mrkstring") {
field(VAL,"test string")
field(PINI,"YES")
}
This works with current releases. I am not sure about 3.14.4
Marty
- Replies:
- RE: Initializing a record VAL field with a constant J. Frederick Bartlett
- References:
- Initializing a record VAL field with a constant J. Frederick Bartlett
- Navigate by Date:
- Prev:
RE: PREC Pete R Jemian
- Next:
Re: PREC Andrew Johnson
- 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: Initializing a record VAL field with a constant Brian McAllister
- Next:
RE: Initializing a record VAL field with a constant J. Frederick Bartlett
- 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
|