Second guiding tool
This commit is contained in:
@@ -55,20 +55,6 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun
|
||||
Controller.getInstance().logEvent("Unmount Sample", str(segment) + str(puck) + str(sample))
|
||||
|
||||
try:
|
||||
if smart_magnet.get_supress() == True:
|
||||
smart_magnet.set_supress(False)
|
||||
time.sleep(0.2)
|
||||
|
||||
#smart_magnet.apply_reverse()
|
||||
#smart_magnet.apply_resting()
|
||||
|
||||
if not force:
|
||||
sample_det = smart_magnet.check_mounted(idle_time=0.5, timeout = 3.0)
|
||||
Controller.getInstance().logEvent("Sample Detection", str(sample_det))
|
||||
if sample_det == False:
|
||||
raise Exception("No pin detected on gonio")
|
||||
|
||||
#Enabling
|
||||
enable_motion()
|
||||
|
||||
if is_normal:
|
||||
@@ -87,8 +73,6 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun
|
||||
|
||||
if not robot.is_gonio():
|
||||
robot.move_gonio()
|
||||
|
||||
#smart_magnet.set_unmount_current()
|
||||
|
||||
curpos = cryopos.getPosition()
|
||||
speed = cryopos.getSpeed() / 1000.
|
||||
@@ -98,11 +82,6 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun
|
||||
|
||||
robot.get_gonio()
|
||||
|
||||
smart_magnet.apply_reverse()
|
||||
smart_magnet.apply_resting()
|
||||
mount_sample_detected = smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0)
|
||||
Controller.getInstance().logEvent("Sample Detection", str(mount_sample_detected))
|
||||
|
||||
if is_aux:
|
||||
robot.move_aux()
|
||||
robot.put_aux(sample)
|
||||
@@ -115,8 +94,6 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun
|
||||
robot.put_dewar(segment, puck, sample)
|
||||
|
||||
set_setting("mounted_sample_position", None)
|
||||
return mount_sample_detected
|
||||
return False
|
||||
finally:
|
||||
if not auto_unmount:
|
||||
smart_magnet.set_default_current()
|
||||
smart_magnet.set_supress(True)
|
||||
pass
|
||||
Reference in New Issue
Block a user