pydm
pydm copied to clipboard
`PyDMEnumButton` widget change pressed state when the underlaying PV is in closed_loop mode, or disabled
Describe the bug
A PyDMEnumButton
widget connected to EPICS PV allow the user to "press" choices when the underlaying PV is disabled (.DISA
= 1
), or in "close_loop" mode (.OMSL
= closed_loop
). A PV under these condition does not change states. However, the widget visually change state even in the underlying PV does not.
Expected behavior
I would expect a behavior similar to the EDM's Choice Button
widget: When the PV is in these states, the widget does not change state when any choice is pressed.
Steps to Reproduce
- Create, for example, an
mbbo
PV with some states, and run it on an IOC. In my case I was using a this PV:
record(mbbo, "SIOC:B34:RF13:0:TRIGMODE")
{
field(DESC, "Trigger mode")
field(DTYP, "Raw Soft Channel")
field(PINI, "YES")
field(ZRST, "Disable")
field(ONST, "STDBY")
field(TWST, "ACCEL")
field(THST, "")
field(ZRVL, "0")
field(ONVL, "2")
field(TWVL, "3")
field(THVL, "")
field(DOL, "SIOC:B34:RF13:0:TRIGMODE_OR CP")
field(OMSL, "supervisory")
field(OUT, "SIOC:B34:RF13:0:MODECFG PP")
field(VAL, "")
info(autosaveFields, "VAL")
}
record(mbbo, "SIOC:B34:RF13:0:TRIGMODE_OR")
{
field(DESC, "Trigger mode (override)")
field(PINI, "YES")
field(ZRST, "Disable")
field(ONST, "STDBY")
field(TWST, "ACCEL")
field(THST, "")
field(ZRVL, "0")
field(ONVL, "2")
field(TWVL, "3")
field(THVL, "")
field(ASG, "Internal")
}
- Create a PyDM display and add a
PyDMEnumButton
widget, setting its channel to this PV (using the CA protocol). - At this point, you should be able to select any of the 3 choices.
- Now, for example, set the output mode of this PV to
closed_loop
:
$ caput SIOC:B34:RF13:0:TRIGMODE.OMSL closed_loop
Old : SIOC:B34:RF13:0:TRIGMODE.OMSL supervisory
New : SIOC:B34:RF13:0:TRIGMODE.OMSL closed_loop
- At this point, the PV can not be change via CA:
$ caput SIOC:B34:RF13:0:TRIGMODE ACCEL
Old : SIOC:B34:RF13:0:TRIGMODE STDBY
New : SIOC:B34:RF13:0:TRIGMODE STDBY
$ caput SIOC:B34:RF13:0:TRIGMODE Disable
Old : SIOC:B34:RF13:0:TRIGMODE STDBY
New : SIOC:B34:RF13:0:TRIGMODE STDBY
- However, if you push choices in the widget, the "pressed" choice changes in the widget:
even if the PV does not change state
- If you create a EDM screen with a
Choice Button
widget connected to this PV, pushing different choices in the widget does not change the "pressed" choice in the widget:
My Platform
I'm running the SLAC's official PyDM (1.10.7
) and EDM packages install in AFS on lcls-dev3
. For the IOC, I was using EPICs base R7.0.3.1-1.0
, also from AFS space.
That is a tricky one! Thank you for this report! I am almost sure it is due to the lack of feedback on the put operation on our side. I will think about a possible solution for that.