23 lines
1.2 KiB
Python
23 lines
1.2 KiB
Python
cold_position_timeout = int(get_setting("cold_position_timeout"))
|
|
if cold_position_timeout > 0:
|
|
if robot.last_command_position == "cold":
|
|
if (time.time() - robot.last_command_timestamp) > cold_position_timeout:
|
|
if robot.is_cold():
|
|
log("Detected cold position timeout", False)
|
|
if get_sequencer().state == State.Ready:
|
|
if robot.state == State.Ready:
|
|
if feedback_psys_safety.take() == True:
|
|
#TODO: Chan
|
|
get_sequencer().evalLine("dry(wait_cold = -1)") #Dry and park : use get_sequencer().evalLine to change application state
|
|
else:
|
|
raise Exception("Cannot clear cold position: feedback_psys_safety = False ")
|
|
else:
|
|
raise Exception("Cannot clear cold position: robot state: " + str(robot.state))
|
|
else:
|
|
raise Exception("Cannot clear cold position: system state: " + str(get_sequencer().state))
|
|
|
|
|
|
|
|
|
|
|
|
|