Closed gfabbris closed 3 years ago
One difficulty in this problem is that in each step we want to wait for certain conditions. For example, in the staging process, we first click on the ramp button, then wait for the supply current to match the magnet current, then turn on the switch heater, then wait for the magnet status to change. Currently this is done in a workaround, using the SetSignal
that simply returns a subscription status based on an input device and function (Codacy doesn't like SetSignal
). Then using abs_set
(with wait=True
) we can make the RunEngine
wait for each step to complete.
I suspect the "best" way to do this is by converting .ramp_button
and .switch_heater
into PVPositioner
. I will try to do it later, for now we can just leave it as is.
Agreed
On Wed, Mar 24, 2021, 9:25 AM Gilberto Fabbris @.***> wrote:
One difficulty in this problem is that in each step we want to wait for certain conditions. For example, in the staging process, we first click on the ramp button, then wait for the supply current to match the magnet current, then turn on the switch heater, then wait for the magnet status to change. Currently this is done in a workaround, using the SetSignal that simply returns a subscription status based on an input device and function (Codacy doesn't like SetSignal). Then using abs_set (with wait=True) we can make the RunEngine wait for each step to complete.
I suspect the "best" way to do this is by converting .ramp_button and .switch_heater into PVPositioner. I will try to do it later, for now we can just leave it as is.
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/APS-4ID-POLAR/ipython-polar/pull/99#issuecomment-805865176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMCBQ7B2YUDJAWOV6J3TFHY5XANCNFSM4ZWHRX7Q .
Rebuilds the magnet staging process to use status objects rather than
while True
loops.