Second guiding tool

This commit is contained in:
gac-S_Changer
2021-08-03 15:18:30 +02:00
parent ac1719b6af
commit 4239b7fb57
149 changed files with 3566 additions and 3606 deletions

View File

@@ -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