aps-8id-dys / ipython-8idiuser

8-ID-I ipython configuration for bluesky (and other)
1 stars 1 forks source link

shutter not closing as expected #119

Closed prjemian closed 4 years ago

prjemian commented 4 years ago

At times, when moving the shutter (bps.mv(shutter, "close"), the shutter fails to move, even though the EPICS PV shows it is open.

Digging deeper, this occurs when the shutter has been closed in bluesky, then later opened in the caQtDM (graphical) window. The shutter support apparently has not received the change in state via an EPICS Channel Access monitor as expected.

The bluesky shutter controls are programmed to only move the shutter if it is not already in the desired position. (While this logic might be best left to the EPICS record or device support to handle, the reasoning is to ensure we do not stall the RunEngine waiting for a moved event that will never happen since the device is already in position.)

The bluesky (ophyd) controls use the signal.value property as the current state. Switching to use signal.get() produces the expected actions.

prjemian commented 4 years ago

It seems there is a difference between EpicsSignal.value and EpicsSignal.get() that is important in situations where the value may have changed outside of bluesky. If concerned, always EpicsSignal.get().

prjemian commented 4 years ago

This resolves the shutter operation. Should feed to upstream apstools support.