TELL: added check for drying if samples are loaded from dewer
This commit is contained in:
@@ -294,7 +294,6 @@ class TellClient:
|
||||
wait: bool = False, # blocking operation
|
||||
timeout: float = 600.0,
|
||||
):
|
||||
print(address)
|
||||
SampleDewarAddress.model_validate(address)
|
||||
|
||||
segment = address.puck.segment
|
||||
@@ -316,13 +315,32 @@ class TellClient:
|
||||
if self.is_busy():
|
||||
raise TellCommandWhileBusyException("mount received while robot is busy")
|
||||
|
||||
logger.info(f"loading sample {sample} from segment {segment} - {puck}")
|
||||
|
||||
self._last_cmd_id = self.start_cmd(
|
||||
"mount", segment, puck, sample, force, read_dm, auto_unmount
|
||||
)
|
||||
|
||||
wait_timeout = timeout + self.estimate_mounting_time(segment)
|
||||
logger.info("waiting for mount to complete")
|
||||
if wait:
|
||||
if wait and segment in "ABCDEF":
|
||||
event, value = self.pshell.wait_events({"state": None, "motion_task": "dry"}, timeout=wait_timeout)
|
||||
if event is None or event == "state":
|
||||
logger.info(f"event: {event} occurred with value: {value}, checking command completed okay")
|
||||
self.check_command_ok(
|
||||
timeout=wait_timeout, msg=f"Mount failed for {segment}{puck}-{sample}: "
|
||||
)
|
||||
elif event == "motion_task" and value == "dry":
|
||||
logger.info(f"event: {event} occurred with value: {value}")
|
||||
logger.info(" Drying occurring, releasing interface to user")
|
||||
else:
|
||||
logger.info(f"Unexpected event: {event} occurred with value: {value}")
|
||||
logger.info("Checking command completed okay anyway")
|
||||
self.check_command_ok(
|
||||
timeout=wait_timeout, msg=f"Mount failed for {segment}{puck}-{sample}: "
|
||||
)
|
||||
elif wait and segment == "X":
|
||||
logger.info("Loading an auxiliary puck")
|
||||
self.check_command_ok(
|
||||
timeout=wait_timeout, msg=f"Mount failed for {segment}{puck}-{sample}: "
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user