I have a BOY "Choice Button" with its PV set to "$(dev):RangeStr"
My 'range' PV is between 1 and 8 with a corresponding ENUM string of 8 also.
The widget works fine in that it sets the 'range' on selecting the ENUM
but when I do
a write to the 'range' from elsewhere, the 'range' is set to the value
but my ENUM widget it not.
I then added the '$(dev):RangeENUM' record so that whenever a
'$(dev):range' is done, a FLNK updates my widget as well.
This works as I would want it to be I'm sure there is a better way (not
having 2 mbbo records ie).
###############################################################
record(ao, "$(dev):range") {
field(DTYP, "asynInt32")
field(PINI, "YES")
field(OUT, "@asyn(int32 $(addr) 1.0) reason(2)")
field(FLNK, "$(dev):RangeENUM PP")
}
## ENUMS for 8 Ranges #####################################
record(mbbo, "$(dev):RangeStr") {
field(DTYP, "Soft Channel")
field(OUT, "$(dev):range PP")
field(ONVL, "1")
field(TWVL, "2")
field(THVL, "3")
field(FRVL, "4")
field(FVVL, "5")
field(SXVL, "6")
field(SVVL, "7")
field(EIVL, "8")
field(ONST, " 1 : 10 mA")
field(TWST, " 2 : 1 mA")
field(THST, " 3 : 100 uA")
field(FRST, " 4 : 10 uA")
field(FVST, " 5 : 1 uA")
field(SXST, " 6 : 100 nA")
field(SVST, " 7 : 10 nA")
field(EIST, " 8 : 1 nA")
}
record(mbbo, "$(dev):RangeENUM") {
field(DTYP, "Soft Channel")
field(OMSL, "closed_loop")
field(DOL, "$(dev):range")
field(OUT, "$(dev):RangeStr PP")
field(ONVL, "1")
field(TWVL, "2")
field(THVL, "3")
field(FRVL, "4")
field(FVVL, "5")
field(SXVL, "6")
field(SVVL, "7")
field(EIVL, "8")
}
Thanks
Amien