From 42739fcc7a5db144be4b162bf1229ac59260e5f7 Mon Sep 17 00:00:00 2001 From: x12sa Date: Fri, 11 Sep 2026 13:15:58 +0200 Subject: [PATCH] docs(flomni): flag unguarded heater-vs-OSA collision gap in fosa_in() Audit of heater interlocks (pre-first-use) found that fosa_in()/ foptics_in() never check fheater position before driving fosaz, even though the OSA travels inside the heater's envelope. Heater motion itself is well protected (ensure_osa_back()/ensure_fheater_up()), but this one direction is open. Not fixing it yet -- documenting it so it is remembered when fheater's userParameter is added during hardware commissioning. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01XdHenMmwbrCz1juWMi1yZc --- .../plugins/flomni/flomni_optics_mixin.py | 7 +++++++ csaxs_bec/device_configs/ptycho_flomni.yaml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_optics_mixin.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_optics_mixin.py index 20004b63..0757ad20 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_optics_mixin.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_optics_mixin.py @@ -167,6 +167,13 @@ class FlomniOpticsMixin: dev.rtx.controller.feedback_enable_with_reset() def fosa_in(self): + # TODO(commissioning): the OSA travels inside the heater's (fheater) + # envelope, but this function never checks fheater position before + # driving fosaz. fosaz must only move while fheater is fully "up" or + # fully "down" -- an intermediate heater position here risks a + # collision. Add a heater-state check (see ensure_osa_back()/ + # ensure_fheater_up() in flomni.py for the pattern) once fheater's + # up/down limits are commissioned. # 6.2 keV, 170 um FZP # umv(dev.losax, -1.4450000, dev.losay, -0.1800) # umv(dev.losaz, -1) diff --git a/csaxs_bec/device_configs/ptycho_flomni.yaml b/csaxs_bec/device_configs/ptycho_flomni.yaml index daa531bc..541549fd 100644 --- a/csaxs_bec/device_configs/ptycho_flomni.yaml +++ b/csaxs_bec/device_configs/ptycho_flomni.yaml @@ -46,6 +46,13 @@ feyey: in: -10.09 deviceTags: - ptycho_flomni +# TODO(commissioning): needs userParameter (e.g. in/up, down) -- move_fheater_down() +# in flomni.py currently reads user_parameter.get("in") and gets None. +# KNOWN GAP: fosa_in()/foptics_in() (flomni_optics_mixin.py) never check fheater +# position before driving fosaz. The OSA travels inside the heater's envelope, so +# fosaz must only move while fheater is fully at its "up" or fully at its "down" +# limit -- an intermediate heater position during fosa_in() risks a collision. +# Verify/add that check once real up/down limits are known from hardware. fheater: description: Heater Y deviceClass: csaxs_bec.devices.omny.galil.fgalil_ophyd.FlomniGalilMotor