From 8b32e35915adabd9107eb6834f1ca96838ae19c4 Mon Sep 17 00:00:00 2001 From: appel_c Date: Fri, 19 Jun 2026 14:17:51 +0200 Subject: [PATCH] wip --- csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 f0fdab0..de6505d 100644 --- a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py +++ b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py @@ -599,11 +599,17 @@ class DDG1(PSIDeviceBase, DelayGeneratorCSAXS): # an acquisition regularly with a WaitTimeoutError, the timeout can be increased but it should # be investigated why the EPICS interface is slow to respond. try: + current_time = time.time() + while time.time() - current_time < 3 and mcs.acquiring.get() != ACQUIRING.ACQUIRING: + time.sleep(0.1) + logger.warning( + f"MCS card is not in acquiring state, current state: {mcs.acquiring.get()}" + ) if mcs.acquiring.get() != ACQUIRING.ACQUIRING: logger.warning( f"MCS card is not in acquiring state, current state: {mcs.acquiring.get()}" ) - status_mcs.wait(timeout=3) + status_mcs.wait(timeout=3) except Exception as exc: logger.warning(f"MCS did not go to Acquiring within 3s. Retrying erase_start {exc}") mcs.erase_start.put(1)