Fix sample detection after auto unmount
This commit is contained in:
+13
-10
@@ -1,34 +1,37 @@
|
||||
#Wed Jan 08 11:01:33 CET 2020
|
||||
autoSaveScanData=true
|
||||
simulation=false
|
||||
commandExecutionEvents=false
|
||||
logDaysToLive=30
|
||||
userAuthenticator=
|
||||
logLevelConsole=Off
|
||||
scanStreamerPort=-1
|
||||
parallelInitialization=false
|
||||
versionTrackingManual=true
|
||||
#Fri Aug 14 09:21:30 CEST 2020
|
||||
hostName=null
|
||||
userManagement=false
|
||||
instanceName=X10SA
|
||||
autoSaveScanData=true
|
||||
simulation=false
|
||||
dataServerPort=-1
|
||||
hideServerMessages=true
|
||||
serverPort=8080
|
||||
versionTrackingEnabled=true
|
||||
dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name}
|
||||
serverEnabled=true
|
||||
commandExecutionEvents=false
|
||||
logDaysToLive=30
|
||||
dataScanReleaseRecords=false
|
||||
depthDimension=0
|
||||
dataScanPreserveTypes=false
|
||||
logLevel=Fine
|
||||
dataScanSaveOutput=false
|
||||
dataScanFlushRecords=true
|
||||
logPath={logs}/{date}_{time}
|
||||
dataLayout=table
|
||||
terminalEnabled=false
|
||||
notificationLevel=null
|
||||
userAuthenticator=
|
||||
logLevelConsole=Off
|
||||
terminalPort=3579
|
||||
scanStreamerPort=-1
|
||||
dataScanSaveScript=false
|
||||
dataScanSaveSetpoints=false
|
||||
parallelInitialization=false
|
||||
createSessionFiles=true
|
||||
versionTrackingLogin={context}/svcusr-hlapp_robot
|
||||
versionTrackingManual=true
|
||||
versionTrackingRemote=git@git.psi.ch\:tell/X10SA.git
|
||||
dataProvider=txt
|
||||
saveCommandStatistics=true
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#Tue Jun 23 13:18:10 CEST 2020
|
||||
#Tue Sep 08 11:44:29 CEST 2020
|
||||
dry_mount_counter=0
|
||||
room_temperature_enabled=false
|
||||
pin_offset=0.0
|
||||
puck_types=true
|
||||
imaging_enabled=false
|
||||
dry_timestamp=1.592911090051E9
|
||||
dry_timestamp=1.59953968313E9
|
||||
roi_h=1000
|
||||
led_level=0.0
|
||||
beamline_status_enabled=false
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#Wed Jun 17 15:36:32 CEST 2020
|
||||
FileSequentialNumber=107
|
||||
#Tue Sep 01 14:22:49 CEST 2020
|
||||
FileSequentialNumber=140
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#Mon Apr 29 16:18:33 CEST 2019
|
||||
#Tue Aug 18 11:35:05 CEST 2020
|
||||
detection=Mechanical
|
||||
disabled=false
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#Thu Sep 19 08:23:57 CEST 2019
|
||||
#Wed Aug 19 08:50:06 CEST 2020
|
||||
detection=Mechanical
|
||||
disabled=false
|
||||
disabled=true
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#Tue Aug 27 11:23:40 CEST 2019
|
||||
#Tue Aug 18 11:33:20 CEST 2020
|
||||
detection=Mechanical
|
||||
disabled=false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Wed Jun 03 10:41:30 CEST 2020
|
||||
#Tue Aug 18 13:34:46 CEST 2020
|
||||
minValue=0.0
|
||||
unit=V
|
||||
offset=0.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Wed Jun 03 10:41:30 CEST 2020
|
||||
#Tue Aug 18 13:34:46 CEST 2020
|
||||
minValue=0.0
|
||||
unit=V
|
||||
offset=0.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#Wed Jun 03 10:41:30 CEST 2020
|
||||
#Tue Aug 18 13:34:46 CEST 2020
|
||||
minValue=0.0
|
||||
unit=V
|
||||
offset=0.0
|
||||
|
||||
@@ -81,7 +81,8 @@ class TellClient(PShellClient):
|
||||
def scan_puck(self, segment, puck, force=False):
|
||||
return self.start_cmd("scan_puck", segment, puck, force)
|
||||
|
||||
def dry(self, heat_time=30.0, speed=0.5, wait_cold = 30.0):
|
||||
#def dry(self, heat_time=30.0, speed=0.5, wait_cold = 30.0):
|
||||
def dry(self, heat_time=None, speed=None, wait_cold = None):
|
||||
return self.start_cmd("dry", heat_time, speed, wait_cold)
|
||||
|
||||
def move_cold(self):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DEFAULT_DRY_HEAT_TIME = 35.0
|
||||
DEFAULT_DRY_SPEED = 0.4
|
||||
DEFAULT_DRY_WAIT_COLD = 30.0
|
||||
DEFAULT_DRY_HEAT_TIME = 40.0
|
||||
DEFAULT_DRY_SPEED = 0.35
|
||||
DEFAULT_DRY_WAIT_COLD = 35.0
|
||||
|
||||
def dry(heat_time=None, speed=None, wait_cold = None):
|
||||
"""
|
||||
@@ -12,13 +12,12 @@ def dry(heat_time=None, speed=None, wait_cold = None):
|
||||
|
||||
if heat_time is None:
|
||||
heat_time = DEFAULT_DRY_HEAT_TIME
|
||||
|
||||
if speed is None:
|
||||
speed = DEFAULT_DRY_SPEED
|
||||
|
||||
if wait_cold is None:
|
||||
wait_cold = DEFAULT_DRY_WAIT_COLD
|
||||
|
||||
|
||||
print "dry heat_time = {}, speed = {}, wait_cold = {}".format(heat_time, speed, wait_cold)
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False)
|
||||
|
||||
sample_det = smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0)
|
||||
Controller.getInstance().logEvent("Sample Detection", str(sample_det))
|
||||
if sample_det == True:
|
||||
if sample_det == True:
|
||||
if auto_unmount and (get_setting("mounted_sample_position") is not None):
|
||||
pos = get_setting("mounted_sample_position")
|
||||
former_segment = pos[0:1]
|
||||
@@ -70,10 +70,10 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False)
|
||||
if mounting_in_same_segment:
|
||||
print "Mounting from the same segment"
|
||||
#auto_unmount set to true so detection remains enabled
|
||||
unmount(force = True, auto_unmount = True, mounting_in_same_segment=mounting_in_same_segment)
|
||||
sample_det = unmount(force = True, auto_unmount = True, mounting_in_same_segment=mounting_in_same_segment)
|
||||
do_unmount = True
|
||||
else:
|
||||
raise Exception("Pin detected on gonio")
|
||||
if sample_det == True:
|
||||
raise Exception("Pin detected on gonio")
|
||||
set_status("Mounting: " + str(segment) + str(puck) + str(sample))
|
||||
Controller.getInstance().logEvent("Mount Sample", str(segment) + str(puck) + str(sample))
|
||||
#location = robot.get_current_point()
|
||||
|
||||
@@ -26,7 +26,7 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun
|
||||
time.sleep(3.0)
|
||||
update_samples_info_sample_unmount(get_puck_name(segment, puck), sample)
|
||||
set_setting("mounted_sample_position", None)
|
||||
return
|
||||
return False
|
||||
|
||||
print "assert no task"
|
||||
robot.assert_no_task()
|
||||
@@ -96,6 +96,7 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun
|
||||
robot.move_dewar()
|
||||
robot.put_dewar(segment, puck, sample, mounting_in_same_segment=mounting_in_same_segment)
|
||||
set_setting("mounted_sample_position", None)
|
||||
return mount_sample_detected
|
||||
finally:
|
||||
if not auto_unmount:
|
||||
smart_magnet.set_default_current()
|
||||
|
||||
Reference in New Issue
Block a user