>>> On 6/11/2004 at 11:57:00 CDT, J Frederick Bartlett wrote:
> 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?
This is because the record has never been processed. SEVR and STAT are set
in alarm(), which is called from process(). I agree that if VAL has been
set and UDF cleared, the alarm fields should also be set appropriately.
If you use ao and longout, you can put your initial value in DOL. I'm not
positive (and can't test this now), but I believe that when the record is
processed, the value will be unchanged. This means you can set PINI=YES
and your alarms will be cleared at initialization.
If you are concerned about the values in these records being modified, you
would need to use Access Security to prevent it.
> 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?
Have you tried defining VAL in your .db file ? If the record is never
processed, the contents of VAL should not be changed after the database is
loaded.
You could also use stringout and put your value in DOL, as above.
----
Brian McAllister Controls Programmer/Beam Physicist
[email protected] MIT-Bates Linear Accelerator
(617) 253-9537 Middleton, MA
- References:
- Initializing a record VAL field with a constant J. Frederick Bartlett
- Navigate by Date:
- Prev:
RE: Initializing a record VAL field with a constant J. Frederick Bartlett
- Next:
Re: PREC Brian McAllister
- 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:
Initializing a record VAL field with a constant J. Frederick Bartlett
- Next:
Re: Initializing a record VAL field with a constant Marty Kraimer
- 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
|