Move flag into beam (mode-dependent)
Warning
STATUS: STUB. Placeholder for the procedure that satisfies
the precondition flag_in_beam of Detector Z-rail alignment to the beam
(detector_z_rail_alignment). The flag is now in the
Beamline components inventory (as 2bma:m44); the
procedure that orchestrates it is what’s still TBD.
Name
set_flag_in
Source
Not yet implemented. Future location: procedures/set_flag_in.py in the 2bm-procedures repository.
Devices
Beamline components: Flag (diagnostic phosphor) — single vertical (Y) motor
2bma:m44. User/dial offset:user = dial - 5mm. User-coord limits: -4.5 to +35.0 mm.
Preconditions
Enable beamline for beam (
enable_beamline).For mono mode: Set energy to preselect (
set_energy_to_preselect) — the target flag Y depends on the current DMM energy via theenergy_move_flaglookup in energy2bm.json.
Parameters
mode(enum:pink|mono) — beamline mode. Default: derived from current DMM state (out = pink, in = mono).flag_y_mm(number, user coord) — explicit target Y. If not given, derive frommode:pink:flag_y_mm = 0(lower position, out of beam).mono:flag_y_mm = energy_move_flag[current_energy_keV](read from energy2bm.json). Indicative values: 13.374 keV → 23 mm, 18 keV → 17 mm, 20 keV → 15 mm, 25 keV → 12 mm, 30+ keV → 0 mm.
Steps
Determine target Y from
mode+ (if mono) energy lookup.Range check:
-4.5 ≤ flag_y_mm ≤ 35.0.move_motor 2bma:m44 <flag_y_mm>; wait for DMOV.
Postconditions
- Satisfies:
flag_in_beam- Predicate:
2bma:m44.RBVwithin motor tolerance of the commandedflag_y_mm.
Failure modes
Motor fault on
2bma:m44— check the motor record’s status and clear before retrying.For mono mode: energy2bm.json has no entry for the current DMM energy — operator must either calibrate the lookup or pass
flag_y_mmexplicitly.Range check fails — typically operator misread mm vs encoded units; verify against the
meters_all.adlMEDM screen.
Notes
In detector_z_rail_alignment (v0.0.1) the procedure assumes
the flag is already in the appropriate position for the running
mode. If pink-beam alignment is being done, the operator should
have driven 2bma:m44 to 0 mm beforehand. The
set_flag_in procedure formalises that step so cora’s
dependency graph can resolve it.