OMSL="closed_loop" doesn't work with constant DOL

Bug #1844537 reported by Ben Franksen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Status tracked in 7.0
3.15
Fix Released
Low
Andrew Johnson
7.0
Fix Released
Low
Andrew Johnson

Bug Description

This was incorrectly documented for the boRecord. I just fixed that in the wiki.

However, I see this as yet another arbitrary limitation.

To lift that we need a small generalisation to how we treat constant links. A constant link just has to remember whether it has been processed before. The flag gets set by dbGetLink and the like and it gets reset after link initialisation (so we can change the "constant" using a CA put to the link field). If dbGetLink finds that the link is constant, then it converts the value from the string stored in the link, but only if it hasn't been processed before. This also means that we can deprecate recGblInitConstantLink because it is now subsumed by dbGetLink.

Revision history for this message
Ralph Lange (ralph-lange) wrote :

FWIW:
Record descriptions have been converted to POD and moved into the .dbd.pod files at the recent documentathon. Those changes have been added as merge proposals, some of which might still be pending their merge.

Revision history for this message
Andrew Johnson (anj) wrote :

Please look at the current state of the link code in the 7.0 branch, there have been *many* changes to this code since the 3.14 and 3.15 releases. Constant links now have several methods in the new Link Support Entry Table (which supports constant arrays and strings), and new link types can be added outside the Base tree, but this means changes to how they work are harder to implement. The only external link type I'm aware of is the pvalink in pva2pva (so not strictly outside the Base tree), but there might be others so we have to be very careful about making changes.

Re Ralph's point, please look at the generated boRecord documentation at https://jenkins.aps.anl.gov/view/EPICS%20Base/job/epics-base-3.15/lastSuccessfulBuild/artifact/html/boRecord.html and propose any wording changes to what's currently written there.

Ben Franksen (bfrk)
summary: - OMSL doesn't work with constant DOL
+ OMSL="closed_loop" doesn't work with constant DOL
Revision history for this message
Ben Franksen (bfrk) wrote :

Below is a diff against commit f3204d8afad49b6f3aa375f7efe705e3b2f68229 for the doc fix.

We just checked that the behavior in 3.15. and 7.0 is the same for all records that have DOL and OMSL: if DOL is constant, OMSL="closed_loop" is ignored and the behavior is as if OMSL="supervisory". And modifying a constant link with a CA put has no effect other than that the value of the DOL field changes.

Your comment regarding the many changes to link support prompted me to look at the new dbLink.h. It looks as if the existing anomalous behavior of constant links is now hard-coded into the design of the LSET interface. This makes it indeed more difficult to implement the change I sketched above.

diff --git a/modules/database/src/std/rec/boRecord.dbd.pod b/modules/database/src/std/rec/boRecord.dbd.pod
index 8df8d7f..6b6d180 100644
--- a/modules/database/src/std/rec/boRecord.dbd.pod
+++ b/modules/database/src/std/rec/boRecord.dbd.pod
@@ -65,9 +65,9 @@ C<losed_loop> or C<supervisory>. If C<supervisory> is specified, the value
 in the VAL field can be set externally via dbPuts at run-time. If
 C<closed_loop> is specified, the VAL field's value is obtained from the
 address specified in the desired output location (DOL) field which can be a
-database link, a channel access link, or a constant. To achieve continuous
-control, a database link to a control algorithm record should be entered in
-the DOL field.
+database link or a channel access link, but not a constant. To achieve
+continuous control, a database link to a control algorithm record should be
+entered in the DOL field.

 L<Address Specification> presents more information on database addresses
 and links. L<Scanning Specification> explaines the effect of database

Revision history for this message
Andrew Johnson (anj) wrote :

Thanks Ben, I have applied your change to the 3.15 branch for 3.15.7 from where it will also be merged up for 7.0.3.1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.