From 3b40cc2a713cc94fbbb571c4c5a5945e36ecfb7a Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 16 Dec 2025 10:56:41 +0100 Subject: [PATCH] w --- csaxs_bec/devices/epics/mcs_card/mcs_card_csaxs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/csaxs_bec/devices/epics/mcs_card/mcs_card_csaxs.py b/csaxs_bec/devices/epics/mcs_card/mcs_card_csaxs.py index a151006..05a69cd 100644 --- a/csaxs_bec/devices/epics/mcs_card/mcs_card_csaxs.py +++ b/csaxs_bec/devices/epics/mcs_card/mcs_card_csaxs.py @@ -207,14 +207,20 @@ class MCSCardCSAXS(PSIDeviceBase, MCSCard): """ # NOTE: If for some reason, the card is still acquiring, we need to stop it first + # This should never happen as the card is properly stopped during unstage + # Can only happen if user manually interferes with the IOC through other means if self.acquiring.get() == ACQUIRING.ACQUIRING: + logger.warning( + f"MCS Card {self.name} was still acquiring on staging. Stopping acquisition." + ) self.stop_all.put(1) status = CompareStatus(self.acquiring, ACQUIRING.DONE) status.wait(timeout=10) # NOTE: Erase all will result in data emission through mca callback subscriptions # The buffer needs to be cleared as this will otherwise lead to missing - # triggers during the scan. + # triggers during the scan. Again, this should not happen if unstage is properly called. + # But user interference or a restart of the device_server may lead to this situation. if self.current_channel.get() != 0: with suppress_mca_callbacks(self): logger.warning(