This commit is contained in:
gac-S_Changer
2018-09-28 11:13:37 +02:00
parent dc21099fd6
commit 37e183bd30
8 changed files with 25 additions and 7 deletions

View File

@@ -52,7 +52,8 @@ class RobotSC(RobotTCP):
self.assert_dewar()
self.start_task('putDewar',segment, puck, sample, is_room_temp())
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
self.assert_dewar()
#self.assert_dewar()
self.assert_cold
def put_gonio(self):
pin_offset = get_pin_offset()

View File

@@ -8,6 +8,7 @@ def dry(heat_time=30.0, speed=0.5, wait_cold = 30.0):
Else move to cold and wait (in seconds) before returning.
"""
print "dry"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
@@ -15,6 +16,8 @@ def dry(heat_time=30.0, speed=0.5, wait_cold = 30.0):
robot.assert_cleared()
#robot.assert_in_known_point()
set_status("Drying")
#Enabling
enable_motion()

View File

@@ -9,7 +9,8 @@ def homing_hexiposi():
robot.assert_cleared()
#robot.assert_in_known_point()
#location = robot.get_current_point()
set_status("Homing hexiposi")
hexiposi.move_home()
hexiposi.waitState(State.Ready,-1)

View File

@@ -6,6 +6,7 @@ def mount(segment, puck, sample, force=False, read_dm=False):
"""
global mount_sample_id, mount_sample_detected
print "mount: ", segment, puck, sample, force
start = time.time()
puck_address = get_puck_address(puck)
@@ -27,6 +28,8 @@ def mount(segment, puck, sample, force=False, read_dm=False):
#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:
@@ -74,15 +77,19 @@ def mount(segment, puck, sample, force=False, read_dm=False):
dry_mount_count = 0
set_setting("dry_mount_counter", dry_mount_count+1)
#TODO: Auto-dry procedure
if is_force_dry():
pass
robot.move_dewar()
robot.move_cold()
mount_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, mount_sample_detected, mount_sample_id)
if mount_sample_detected == False:
raise Exception("No pin detected on gonio")
if is_force_dry():
print "Auto dry"
log("Starting auto dry", False)
dry()
return [mount_sample_detected, mount_sample_id]
finally:
smart_magnet.set_default_current()

View File

@@ -123,7 +123,9 @@ def recover():
if robot.get_current_point() is not None:
raise Exception("Robot is in known location")
set_status("Recovering")
#Enabling
enable_motion()

View File

@@ -8,6 +8,8 @@ def robot_recover():
robot.reset_motion()
robot.wait_ready()
set_status("Recovering robot")
#Enabling
enable_motion()

View File

@@ -12,6 +12,7 @@ robot.assert_cleared()
#Enabling
set_status("Scanning pin: " + str(pin_name))
enable_motion()
set_hexiposi(segment)
@@ -44,5 +45,4 @@ print "Datamatrix: " , mount_sample_id
robot.move_dewar()
robot.put_dewar(segment, puck, sample)

View File

@@ -21,6 +21,8 @@ def unmount(segment = None, puck = None, sample = None, force=False):
#robot.assert_in_known_point()
hexiposi.assert_homed()
set_status("Umounting: " + str(segment) + str(puck) + str(sample))
try:
smart_magnet.enforce_sample_detection()
if smart_magnet.check_mounted(idle_time=0.5, timeout = 3.0) == False: