This commit is contained in:
gac-S_Changer
2019-02-12 13:44:08 +01:00
parent 911022b078
commit ae5a71bcdd
39 changed files with 106 additions and 83 deletions
+2 -1
View File
@@ -55,7 +55,8 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False)
smart_magnet.set_supress(False)
time.sleep(0.2)
#To better dectect sample
smart_magnet.apply_resting()
smart_magnet.apply_resting()
time.sleep(0.5)
if smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0) == True:
if auto_unmount and (get_setting("mounted_sample_position") is not None):
#auto_unmount set to true so detection remains enabled
+7 -2
View File
@@ -118,7 +118,7 @@ def move_to_safest_point(segment, vicinity_tolerance = 100):
#print "Recovered to point " + str(robot.get_curjoint_or_pointrent_point())
def recover():
def recover(move_park = True):
#Initial checks
robot.assert_no_task()
robot.reset_motion()
@@ -144,7 +144,12 @@ def recover():
location = robot.get_current_point()
if location is None:
raise Exception("Robot didn't reach known point")
return "Success recovering to point: " + str(location)
print "Success recovered to point: " + str(location)
if move_park:
robot.move_park()
return "Success recovered to park position"
else:
return "Success recovered to point: " + str(location)
#finally:
# robot.set_default_speed()
if not is_on_known_segment: