Experimental Physics and
| |||||||||||||||||
|
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(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
| ||||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |