Skip to content

Add the PDF fast shutter (fs) to the profile - #7

Merged
Anthony Sligar (sligara7) merged 1 commit into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-04a-fast-shutter
Oct 23, 2026
Merged

Anthony Sligar (sligara7) merged 1 commit into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-04a-fast-shutter

Conversation

@sligara7

Copy link
Copy Markdown

Adds pdftools.shutter.FastShutter and fs (XF:28ID1B-OP{PSh:1-Det:2}) to the profile, ported from pdf-profile-collection 12-optics.py.

  • Cmd/Sts are OFF/ON enum records and the shutter is inverted: OFF opens, ON closes (records read with caget -d DBR_CTRL_ENUM, 2026-10-23).
  • mv(fs, 1) / 'Open' opens and mv(fs, 0) / 'Close' closes, as the existing plans call it. A move finishes when Sts matches, then waits settle_time (0.1 s, as before). fs.state reads Open/Close.

Verified: mock tests only (inverted mapping, readback wait and timeout, rejected values; profile boots in mock mode with fs). Not run on the beamline.

FastShutter drives the inverted Cmd/Sts enum records (OFF opens, ON closes); mv(fs, 1)/'Open' and mv(fs, 0)/'Close' work as in pdf-profile-collection 12-optics, and a move waits for the Sts readback.

Assisted-by: copilot:claude-opus-5-5
Copilot AI balanced review requested due to automatic review settings October 23, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Inverted hardware shutter control has only mock validation and needs beamline-owner review before approval.

No open issues 🎉

What changed in this PR

Adds the PDF fast shutter to the collection profile, exposing fs for existing plans with inverted hardware command mapping.

Changes:

  • Implements FastShutter with numeric/string move targets, readable state, readback confirmation, and settling delay.
  • Registers fs with the beamline PV prefix.
  • Adds mock tests for command mapping, readback timeout, invalid values, and profile startup.
File Description
tests/​test_utils.py Checks that fs connects during mock profile startup.
tests/​test_shutter.py Tests inverted commands, state readings, timeout, and value rejection.
src/​pdftools/​shutter.py Implements the shutter device and move completion behavior.
src/​pdftools/​profiles/​collection.py Instantiates fs in the collection profile.

Review effort: Balanced

@sligara7
Anthony Sligar (sligara7) merged commit dd55477 into NSLS2:pdf-profile-conversion Oct 23, 2026
4 checks passed
@sligara7
Anthony Sligar (sligara7) deleted the pdf-conv-04a-fast-shutter branch October 23, 2026 22:03
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