Skip to content

Commit ddb97fa

Browse files
JunAishimadalekreitler-bnl
authored andcommitted
move fix for short distance collection into block for FMX
* refs 14c36dd * NSLS2#153
1 parent c56319b commit ddb97fa

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

robot_lib.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,14 @@ def unmountRobotSample(puckPos,pinPos,sampID): #will somehow know where it came
407407
daq_lib.gui_message(message)
408408
logger.error(message)
409409
return 0
410-
#detDist = beamline_lib.motorPosFromDescriptor("detectorDist")
411-
det_z_pv = 'XF:17IDC-ES:FMX{Det-Ax:Z}Mtr'
412-
detDist = caget(f'{det_z_pv}.RBV')
413-
if detDist < ROBOT_MIN_DISTANCE:
414-
caput(f'{det_z_pv}.VAL', ROBOT_MIN_DISTANCE, wait=True) # TODO shouldn't this wait for SE transition or something??
415-
detDist = caget(f'{det_z_pv}.RBV')
410+
if daq_utils.beamline == "fmx":
411+
det_z_pv = 'XF:17IDC-ES:FMX{Det-Ax:Z}Mtr'
412+
detDist = caget(f'{det_z_pv}.RBV')
413+
if detDist < ROBOT_MIN_DISTANCE:
414+
caput(f'{det_z_pv}.VAL', ROBOT_MIN_DISTANCE, wait=True) # TODO shouldn't this wait for SE transition or something??
415+
detDist = caget(f'{det_z_pv}.RBV')
416+
else:
417+
detDist = beamline_lib.motorPosFromDescriptor("detectorDist")
416418
if detDist < ROBOT_MIN_DISTANCE and abs(detDist - ROBOT_MIN_DISTANCE) > ROBOT_DISTANCE_TOLERANCE:
417419
logger.error(f"ERROR - Detector closer than {ROBOT_MIN_DISTANCE} and move than {ROBOT_DISTANCE_TOLERANCE} from {ROBOT_MIN_DISTANCE}! actual distance: {detDist}. Stopping.")
418420
return 0

0 commit comments

Comments
 (0)