From 6de9b5b89d7e32221f3cb62907b6f583c44a4f38 Mon Sep 17 00:00:00 2001 From: appleb_m Date: Wed, 26 Nov 2025 15:38:58 +0100 Subject: [PATCH] DAQ: added new TELL exceptions --- daq/src/mxlibs3/tell_client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/daq/src/mxlibs3/tell_client.py b/daq/src/mxlibs3/tell_client.py index cca97399..c358f665 100755 --- a/daq/src/mxlibs3/tell_client.py +++ b/daq/src/mxlibs3/tell_client.py @@ -40,6 +40,9 @@ class TellCommandWhileBusyException(Exception): pass +class TellConnectionException(Exception): + pass + VALID_DEWAR_POSITIONS = [f"{p}{n}" for n in "12345" for p in "ABCDEFX"] POSITION_PARK = "pPark" @@ -49,6 +52,7 @@ POSITION_DEWAR = "pDewar" POSITION_HOME = "pHome" POSITION_HEATER = "pHeatB" +#Nov 26 13:36:00 mx-x06da-queue-01.psi.ch AareDAQ[2944444]: 2025-11-26 13:36:00,388 - aareDAQ - ERROR - Error getting status: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) class TellClient: def __init__(self, bl: MXBeamline): @@ -155,6 +159,10 @@ class TellClient: time.sleep(0.2) self.get_state() if self.state != "Ready": + if self.state == "Initializing": + raise Exception("Tell reconnecting") + elif self.state == "Closing": + raise Exception("Tell is disconnecting") raise Exception("Invalid state: " + str(self.state)) def set_in_mount_position(self, value):