This commit is contained in:
gac-S_Changer
2018-09-17 16:56:55 +02:00
parent 531c3f5dfe
commit bc21bb95a3
21 changed files with 486 additions and 114 deletions

View File

@@ -4,7 +4,7 @@ def mount(segment, puck, sample, force=False, read_dm=False):
print "mount: ", segment, puck, sample, force
start = time.time()
#Initial checks
assertValidAddress(segment, puck, sample)
assert_valid_address(segment, puck, sample)
assert_puck_detected(segment, puck)
robot.assert_no_task()
@@ -45,8 +45,11 @@ def mount(segment, puck, sample, force=False, read_dm=False):
smart_magnet.set_mount_current()
try:
robot.put_gonio()
robot.move_dewar()
if smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0) == False:
robot.move_dewar()
sample_detected = smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0)
#TODO: Should do on finally?
update_samples_info_sample_mount(get_puck_name(segment, puck), sample, sample_detected)
if sample_detected == False:
raise Exception("No pin detected on gonio")
finally:
smart_magnet.set_default_current()