This commit is contained in:
@@ -23,10 +23,6 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False)
|
||||
assert_valid_address(segment, puck, sample)
|
||||
assert_puck_detected(segment, puck)
|
||||
|
||||
if auto_unmount:
|
||||
if get_setting("mounted_sample_position") is not None:
|
||||
unmount()
|
||||
|
||||
if robot.simulated:
|
||||
time.sleep(3.0)
|
||||
mount_sample_detected = True
|
||||
@@ -41,14 +37,17 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False)
|
||||
robot.assert_cleared()
|
||||
#robot.assert_in_known_point()
|
||||
hexiposi.assert_homed()
|
||||
|
||||
set_status("Mounting: " + str(segment) + str(puck) + str(sample))
|
||||
|
||||
|
||||
try:
|
||||
smart_magnet.enforce_sample_detection()
|
||||
if smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0) == True:
|
||||
raise Exception("Pin detected on gonio")
|
||||
|
||||
if auto_unmount and (get_setting("mounted_sample_position") is not None):
|
||||
unmount(force = True)
|
||||
else:
|
||||
raise Exception("Pin detected on gonio")
|
||||
|
||||
set_status("Mounting: " + str(segment) + str(puck) + str(sample))
|
||||
#location = robot.get_current_point()
|
||||
|
||||
#Enabling
|
||||
|
||||
Reference in New Issue
Block a user