From f8d2af4c5b412db0205cdf096deca32a3a5703b6 Mon Sep 17 00:00:00 2001 From: appel_c Date: Wed, 11 Feb 2026 09:45:40 +0100 Subject: [PATCH] fix(ddg1): revert to shutter signal as mcs status signal is too slow --- .../devices/epics/delay_generator_csaxs/ddg_1.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py index 994fd38..07a4d69 100644 --- a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py +++ b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py @@ -537,12 +537,15 @@ class DDG1(PSIDeviceBase, DelayGeneratorCSAXS): # be investigated why the EPICS interface is slow to respond. status_mcs.wait(timeout=3) - # NOTE If the MCS card is present, we may also use its signal wait for the burst cycle to finish. - # This is True for any non-fly scans, as for fly scans the MCS card will not receive the additional - # trigger pulse from the ef delay pair, check on_stage. - if mcs is not None and mcs.enabled and self.scan_info.msg.scan_type != "fly": - # We can use the acquiring signal of the MCS card to check if the burst cycle is finished. - status = TransitionStatus(mcs.acquiring, [ACQUIRING.ACQUIRING, ACQUIRING.DONE]) + # Use fast shutter readback in case it is not kept open + # NOTE: THe update frequency of the EpicsSIgnal is ~10Hz (100ms), needs to be checked if that can + # be adjusted to ~2kHz + if ( + self.fast_shutter_control.get() != 1 + ): # Shutter is not kept open, we can rely on its close signal. + status = TransitionStatus( + self.fast_shutter_readback, [1, 0] + ) # Add timeout error with explicit info update epics update freq else: # NOTE This sleep is needed for 20ms to make sure that the HW of the DDG is # again ready to process new commands. It was transferred from just after the