Experimental Physics and Industrial Control System
SUMMARY OF PROBLEM
invalid.db contains the definitions
record(mbbo,"recordA") {
field(OUT, "recordB.C PP MS")
...
}
record(calcout,"recordB") {
field(INPB, "recordA.MASK NPP MS")
....
}
The problem is that when recordA is first processed recordB shows an alarm.
Let me present a solution first
Instead of the above use
record(mbbo,"recordA") {
field(OUT, "recordB.C NPP NMS")
field(FLNK,"recordB")
...
}
record(calcout,"recordB") {
field(INPB, "recordA.MASK NPP MS")
....
}
Or even better
record(mbbo,"recordA") {
field(FLNK,"recordB")
...
}
record(calcout,"recordB") {
field(INPB, "recordA.MASK NPP MS")
field(INPC,"recordA NPP MS")
}
Note that the invalid.db has one more problem. recordB also has
field(INPA, "devRecord NPP MS")
Until devRecord is processed it will cause recordB to alarm.
In devRecord just specify
field(PINI,"YES")
Now for the gory details of why the original invalid.db does not work.
recordA processes. The mbboRecord support does the following:
checkAlarms(pmbbo);
if (pmbbo->nsev < INVALID_ALARM )
status=writeValue(pmbbo); /* write the new value */
This happens BEFORE recGblResetAlarms. writeValue calls dbPutLink. dbPutLink
uses NSEV to decide how to honor MS, which DOES NOT put recordB into alarm.
Since OUT also has PP set recordB is processed. calcout calls dbGetLink to get a
value from INPB. It uses SEVR to honor MS, which DOES puts recordB into alarm.
dbPutLink uses nsev instead of sevr because it knows that it is being called by
the record containing the link. It want to pass it's records severity to the
linked record.
dbGetLink gets the severity from the linked record. It uses SEVR because it
doesn't know that it is called as a result of the linked record being processed.
What to do?
One idea would be to have dbGetLink check the PACT field and then use NSEV
instead of SEVR. This is not a good idea since if it finds PACT true it has no
idea about the state of the linked record. Did it call checkAlarms? Did it call
recGblResetAlarms? It has no idea.
Thus I don't see that any changes to dbAccess will help.
Marty Kraimer
- References:
- RE: Spurious link alarms generated? J. Frederick Bartlett
- Navigate by Date:
- Prev:
Re: Linking Unix Matlab-Compiled Programs against MCA Carl Lionberger
- Next:
RE: CA_UDP error message Jeff Hill
- 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: Spurious link alarms generated? J. Frederick Bartlett
- Next:
Software listing Ian Lenzen
- 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