Skip to content

Forward stop() in devices that move motors from set() - #118

Open
Anthony Sligar (sligara7) wants to merge 1 commit into
NSLS2:mainfrom
sligara7:hex-wrappers-forward-stop
Open

Anthony Sligar (sligara7) wants to merge 1 commit into
NSLS2:mainfrom
sligara7:hex-wrappers-forward-stop

Conversation

@sligara7

Copy link
Copy Markdown
Contributor

Slits, Filter, DCLM and FOV_2_4_mm_Camera move motors from their own set(). They had no stop(), so the RunEngine (which only stops Stoppable objects it moved) could not stop those motors on a pause or abort. Each now forwards stop() to the motors its set() moves:

  • Slits: the four blades
  • Filter: the filter motor
  • DCLM: crystal 1 vertical translation and the cooled beam stop (the beam-mode change)
  • FOV_2_4_mm_Camera: the objective selector

Same fix as FrontEndSlit in #117 (found in its review). #116 touches filters.py too; whichever merges second needs a small rebase.

Verification: mock tests (tests/test_movable_wrappers_stop.py, failing before the change); full suite passes except the known test_detector_viewer_axes environment failure. Not tested on the beamline.

…tive camera move

Without stop() the RunEngine cannot stop these motors on a pause or abort.

Assisted-by: copilot:claude-opus-5-5

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Stopping the camera selector between objectives leaves its active move status pending indefinitely.

1 open issue
What changed in this PR

Adds motor-stop forwarding to four movable device wrappers so the RunEngine can stop their underlying motors during pause or abort, following the approach used for FrontEndSlit.

Changes:

  • Adds stop() methods to Slits, Filter, DCLM, and FOV_2_4_mm_Camera.
  • Forwards stop commands concurrently for wrappers controlling multiple motors.
  • Adds parameterized mock tests for stop support and motor-stop commands.
File Description
tests/​test_movable_wrappers_stop.py Tests stop forwarding for all four wrappers.
src/​hextools/​photon_delivery_system/​slits.py Stops all four slit blades concurrently.
src/​hextools/​photon_delivery_system/​filters.py Forwards stop to the filter motor.
src/​hextools/​photon_delivery_system/​dclm.py Stops both motors used for beam-mode changes.
src/​hextools/​motors.py Forwards camera stop to the objective selector.

Review effort: Balanced

Comment thread src/hextools/motors.py
Comment on lines +212 to +214
async def stop(self, success: bool = False):
"""Stop the objective selector, which the IOC moves to the chosen objective."""
await self.obj_selector.stop()

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants