DAQ: added new TELL exceptions

This commit is contained in:
appleb_m committed 2025-11-26 15:38:58 +01:00
1 parent 4647a56c02
commit 6de9b5b89d
1 file changed
+8
+8
View File
@@ -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):