From d5403abfa42d296ad03009f5dc2b109013b67181 Mon Sep 17 00:00:00 2001 From: gac-x05la Date: Thu, 28 Nov 2024 10:27:23 +0100 Subject: [PATCH] bluestage on GF --- tomcat_bec/devices/gigafrost/gigafrostcamera.py | 7 ++++++- tomcat_bec/devices/gigafrost/stddaq_client.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tomcat_bec/devices/gigafrost/gigafrostcamera.py b/tomcat_bec/devices/gigafrost/gigafrostcamera.py index 7f65e01..63d703c 100644 --- a/tomcat_bec/devices/gigafrost/gigafrostcamera.py +++ b/tomcat_bec/devices/gigafrost/gigafrostcamera.py @@ -188,7 +188,7 @@ class GigaFrostCameraMixin(CustomDetectorMixin): if self.parent.infoSyncFlag.value == 0: self.parent.cmdSyncHw.set(1).wait() # Switch to acquiring - self.parent.cmdStartCamera.set(1).wait() + self.parent.bluestage() def on_unstage(self) -> None: """Specify actions to be executed during unstage. @@ -545,6 +545,11 @@ class GigaFrostCamera(PSIDetectorBase): # Commit parameters self.cmdSetParam.set(1).wait() + def bluestage(self): + """ Bluesky style stage""" + # Switch to acquiring + self.cmdStartCamera.set(1).wait() + def set_acquisition_mode(self, acq_mode): """ Set acquisition mode diff --git a/tomcat_bec/devices/gigafrost/stddaq_client.py b/tomcat_bec/devices/gigafrost/stddaq_client.py index 1549b5b..bd6b670 100644 --- a/tomcat_bec/devices/gigafrost/stddaq_client.py +++ b/tomcat_bec/devices/gigafrost/stddaq_client.py @@ -69,6 +69,7 @@ class StdDaqMixin(CustomDeviceMixin): message = {"command": "start", "path": file_path, "n_image": num_images} ii = 0 while True: + self.parent.connect() reply = self.parent.message(message) if reply is not None: @@ -385,7 +386,7 @@ class StdDaqClient(PSIDeviceBase): return # If stop_all didn't stop, nuke the whole thing - logger.error(f"[{self.name}] Stop-all command did not finish in time, nuking the stdDAQ") + logger.error(f"[{self.name}] Don't stop, make it rock!!!") self.nuke() sleep(timeout)