This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
|
||||
|
||||
def dry(heat_time, speed):
|
||||
def dry(heat_time=30.0, speed=0.5, wait_cold = 30.0):
|
||||
"""
|
||||
heat_time (float): in seconds
|
||||
speed (float): % of nominal speed
|
||||
wait_cold(float): if negative, move to dewar after drying
|
||||
Else move to cold and wait (in seconds) before returning.
|
||||
"""
|
||||
print "dry"
|
||||
#Initial checks
|
||||
@@ -27,4 +29,8 @@ def dry(heat_time, speed):
|
||||
set_heater(False)
|
||||
set_air_stream(False)
|
||||
|
||||
robot.move_dewar()
|
||||
if wait_cold >=0 :
|
||||
robot.move_cold()
|
||||
time.sleep(wait_cold)
|
||||
else:
|
||||
robot.move_dewar()
|
||||
@@ -26,42 +26,44 @@ def mount(segment, puck, sample, force=False, read_dm=False):
|
||||
robot.assert_cleared()
|
||||
#robot.assert_in_known_point()
|
||||
hexiposi.assert_homed()
|
||||
|
||||
if smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0) == True:
|
||||
raise Exception("Pin detected on gonio")
|
||||
|
||||
#location = robot.get_current_point()
|
||||
|
||||
#Enabling
|
||||
enable_motion()
|
||||
|
||||
set_hexiposi(segment)
|
||||
|
||||
if not force:
|
||||
visual_check_hexiposi(segment)
|
||||
|
||||
if not robot.is_dewar():
|
||||
robot.move_dewar()
|
||||
|
||||
robot.get_dewar(segment, puck, sample)
|
||||
|
||||
set_setting("mounted_sample_position", get_sample_name(segment, puck, sample))
|
||||
|
||||
if read_dm:
|
||||
barcode_reader.start_read(10.0)
|
||||
robot.move_scanner()
|
||||
time.sleep(1.0)
|
||||
|
||||
robot.move_gonio()
|
||||
|
||||
if read_dm:
|
||||
mount_sample_id = barcode_reader.get_readout()
|
||||
print "Datamatrix: " , mount_sample_id
|
||||
else:
|
||||
mount_sample_id = None
|
||||
|
||||
smart_magnet.set_mount_current()
|
||||
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")
|
||||
|
||||
#location = robot.get_current_point()
|
||||
|
||||
#Enabling
|
||||
enable_motion()
|
||||
|
||||
set_hexiposi(segment)
|
||||
|
||||
if not force:
|
||||
visual_check_hexiposi(segment)
|
||||
|
||||
if not robot.is_dewar():
|
||||
robot.move_dewar()
|
||||
|
||||
robot.get_dewar(segment, puck, sample)
|
||||
|
||||
set_setting("mounted_sample_position", get_sample_name(segment, puck, sample))
|
||||
|
||||
if read_dm:
|
||||
barcode_reader.start_read(10.0)
|
||||
robot.move_scanner()
|
||||
time.sleep(1.0)
|
||||
|
||||
robot.move_gonio()
|
||||
|
||||
if read_dm:
|
||||
mount_sample_id = barcode_reader.get_readout()
|
||||
print "Datamatrix: " , mount_sample_id
|
||||
else:
|
||||
mount_sample_id = None
|
||||
|
||||
smart_magnet.set_mount_current()
|
||||
|
||||
robot.put_gonio()
|
||||
robot.move_dewar()
|
||||
mount_sample_detected = smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0)
|
||||
|
||||
48
script/motion/scan_pin.py
Normal file
48
script/motion/scan_pin.py
Normal file
@@ -0,0 +1,48 @@
|
||||
segment, puck, sample, force = "B",1,1, True
|
||||
pin_name = get_sample_name(segment, puck, sample)
|
||||
|
||||
|
||||
print "scan pin", pin_name
|
||||
#Initial checks
|
||||
robot.assert_no_task()
|
||||
robot.reset_motion()
|
||||
robot.wait_ready()
|
||||
robot.assert_cleared()
|
||||
#robot.assert_in_known_point()
|
||||
|
||||
#Enabling
|
||||
|
||||
|
||||
enable_motion()
|
||||
set_hexiposi(segment)
|
||||
if not force:
|
||||
visual_check_hexiposi(segment)
|
||||
|
||||
|
||||
robot.move_park()
|
||||
|
||||
gripper_cam.update()
|
||||
background_img = gripper_cam.getImage()
|
||||
|
||||
|
||||
if not robot.is_dewar():
|
||||
robot.move_dewar()
|
||||
|
||||
robot.get_dewar(segment, puck, sample)
|
||||
|
||||
robot.move_park()
|
||||
gripper_cam.update()
|
||||
sample_img = gripper_cam.getImage()
|
||||
|
||||
barcode_reader.start_read(10.0)
|
||||
robot.move_scanner()
|
||||
time.sleep(1.0)
|
||||
|
||||
mount_sample_id = barcode_reader.get_readout()
|
||||
print "Datamatrix: " , mount_sample_id
|
||||
|
||||
robot.move_dewar()
|
||||
robot.put_dewar(segment, puck, sample)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ def unmount(segment = None, puck = None, sample = None, force=False):
|
||||
#Initial checks
|
||||
assert_valid_address(segment, puck, sample)
|
||||
assert_puck_detected(segment, puck)
|
||||
|
||||
|
||||
robot.assert_no_task()
|
||||
robot.reset_motion()
|
||||
robot.wait_ready()
|
||||
@@ -21,25 +21,27 @@ def unmount(segment = None, puck = None, sample = None, force=False):
|
||||
#robot.assert_in_known_point()
|
||||
hexiposi.assert_homed()
|
||||
|
||||
if smart_magnet.check_mounted(idle_time=0.5, timeout = 3.0) == False:
|
||||
raise Exception("No pin detected on gonio")
|
||||
|
||||
|
||||
#Enabling
|
||||
enable_motion()
|
||||
|
||||
set_hexiposi(segment)
|
||||
|
||||
if not force:
|
||||
visual_check_hexiposi(segment)
|
||||
|
||||
#location = robot.get_current_point()
|
||||
|
||||
if not robot.is_gonio():
|
||||
robot.move_gonio()
|
||||
|
||||
smart_magnet.set_unmount_current()
|
||||
try:
|
||||
smart_magnet.enforce_sample_detection()
|
||||
if smart_magnet.check_mounted(idle_time=0.5, timeout = 3.0) == False:
|
||||
raise Exception("No pin detected on gonio")
|
||||
|
||||
|
||||
#Enabling
|
||||
enable_motion()
|
||||
|
||||
set_hexiposi(segment)
|
||||
|
||||
if not force:
|
||||
visual_check_hexiposi(segment)
|
||||
|
||||
#location = robot.get_current_point()
|
||||
|
||||
if not robot.is_gonio():
|
||||
robot.move_gonio()
|
||||
|
||||
smart_magnet.set_unmount_current()
|
||||
|
||||
robot.get_gonio()
|
||||
#TODO: Shuld check if smart magnet detection is off?
|
||||
update_samples_info_sample_unmount(get_puck_name(segment, puck), sample)
|
||||
|
||||
Reference in New Issue
Block a user