From 794f3df6f15bd3ff0ae96d6929101f4578ddc616 Mon Sep 17 00:00:00 2001 From: appel_c Date: Fri, 19 Jun 2026 14:32:20 +0200 Subject: [PATCH] w --- .../epics/delay_generator_csaxs/ddg_1.py | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 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 62e5224..72213b3 100644 --- a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py +++ b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py @@ -599,21 +599,22 @@ 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.error( - f"MCS card is not finishing after 3s, current state: {mcs.acquiring.get()}, waiting another 3s for its return to ACQUIRING state. If this happens regularly, please check the EPICS interface and the MCS card logic." - ) - status_mcs.wait(timeout=3) + # 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.error( + # f"MCS card is not finishing after 3s, current state: {mcs.acquiring.get()}, waiting another 3s for its return to ACQUIRING state. If this happens regularly, please check the EPICS interface and the MCS card logic." + # ) + 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) - status_mcs.wait(timeout=3) + raise exc + # mcs.erase_start.put(1) + # status_mcs.wait(timeout=3) status = CompareStatus(mcs.acquiring, ACQUIRING.DONE) logger.info(f"Finished preparing mcs card {time.time()-start_time}")