This commit is contained in:
gac-S_Changer
2018-05-29 10:32:34 +02:00
parent 05f982c86b
commit fb1e1221f1
14 changed files with 689 additions and 343 deletions

View File

@@ -1,15 +1,44 @@
def unmount(segment, puck, sample):
def unmount(segment, puck, sample, force=False):
"""
"""
print "unmount: ", segment, puck, sample, force
#Initial checks
assertValidAddress(segment, puck, sample)
robot.assert_no_task()
robot.state.assertReady()
robot.assert_cleared()
hexiposi.move(segment)
if hexiposi.homed == False:
raise Exception ("Hexiposi is not homed")
img_segment = get_img_cover_pos()
if img_segment != segment:
raise Excepton ("Image detection of cover does not match hexiposi: " + str(img_segment))
#Enabling
enable_motion()
if type(segment) == str:
segment = ord(segment.upper()) - ord('A') +1
set_hexiposi(segment)
robot.unmount(segment, puck, sample)
if not force:
#Clearing for image processing
robot.move_park()
assert_img_in_cover_pos(segment)
location = get_current_point()
try:
robot.get_gonio()
except:
#TODO: recover
raise
try:
robot.move_dewar()
except:
#TODO: recover
raise
try:
robot.pet_dewar(segment, puck, sample)
except:
#robot.move_dewar()
raise