Skip to content

Commit

Permalink
move fix for short distance collection into block for FMX
Browse files Browse the repository at this point in the history
 * refs 14c36dd
 * NSLS2#153
  • Loading branch information
JunAishima authored and dalekreitler-bnl committed Jan 21, 2022
1 parent e2f9675 commit fceeec6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions robot_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,14 @@ def unmountRobotSample(puckPos,pinPos,sampID): #will somehow know where it came
daq_lib.gui_message(message)
logger.error(message)
return 0
#detDist = beamline_lib.motorPosFromDescriptor("detectorDist")
det_z_pv = 'XF:17IDC-ES:FMX{Det-Ax:Z}Mtr'
detDist = caget(f'{det_z_pv}.RBV')
if detDist < ROBOT_MIN_DISTANCE:
caput(f'{det_z_pv}.VAL', ROBOT_MIN_DISTANCE, wait=True) # TODO shouldn't this wait for SE transition or something??
detDist = caget(f'{det_z_pv}.RBV')
if daq_utils.beamline == "fmx":
det_z_pv = 'XF:17IDC-ES:FMX{Det-Ax:Z}Mtr'
detDist = caget(f'{det_z_pv}.RBV')
if detDist < ROBOT_MIN_DISTANCE:
caput(f'{det_z_pv}.VAL', ROBOT_MIN_DISTANCE, wait=True) # TODO shouldn't this wait for SE transition or something??
detDist = caget(f'{det_z_pv}.RBV')
else:
detDist = beamline_lib.motorPosFromDescriptor("detectorDist")
if detDist < ROBOT_MIN_DISTANCE and abs(detDist - ROBOT_MIN_DISTANCE) > ROBOT_DISTANCE_TOLERANCE:
logger.error(f"ERROR - Detector closer than {ROBOT_MIN_DISTANCE} and move than {ROBOT_DISTANCE_TOLERANCE} from {ROBOT_MIN_DISTANCE}! actual distance: {detDist}. Stopping.")
return 0
Expand Down

0 comments on commit fceeec6

Please sign in to comment.