slaclab / pydm

Python Display Manager
http://slaclab.github.io/pydm/
Other
113 stars 78 forks source link

`PyDMEnumButton` widget change pressed state when the underlaying PV is in closed_loop mode, or disabled #710

Open jesusvasquez333 opened 3 years ago

jesusvasquez333 commented 3 years ago

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

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`:
```bash
$ 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

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.

hhslepicka commented 3 years ago

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.