Skip to content

Expose STARBackend.channels_request_stop_disk_z_positions() (bulk read)#1058

Merged
BioCam merged 2 commits into
PyLabRobot:mainfrom
BioCam:expose-channels-request-stop-disk-z-positions
May 22, 2026
Merged

Expose STARBackend.channels_request_stop_disk_z_positions() (bulk read)#1058
BioCam merged 2 commits into
PyLabRobot:mainfrom
BioCam:expose-channels-request-stop-disk-z-positions

Conversation

@BioCam
Copy link
Copy Markdown
Collaborator

@BioCam BioCam commented May 22, 2026

Reads every channel's stop-disk Z (the bare stop disk, excluding any mounted tip) across all channels. The stop-disk read is a per-channel-module command with no master-level equivalent, so this fans out one request_probe_z_position call per channel rather than a single master read.

Mirrors the existing single-channel stop-disk / tip-bottom split (request_probe_z_position vs request_tip_bottom_z_position) at the all-channel level, and follows the channels_request_* naming.

Why not just wrap the firmware's C0 RZ? The firmware has a one-shot all-channel reader (C0 RZ) that returns each channel's bottom-most Z - tip end if a tip is fitted, bare stop disk if not. It is tempting because it is a single round-trip. We deliberately do not expose it, because that tip-vs-no-tip branch is computed invisibly inside the firmware: a caller reading channels_request_stop_disk_z_positions() cannot tell from the call site whether a given number is a tip end or a bare stop disk, and the rule that produced it lives in firmware we do not control. That implicitness is a maintenance hazard - the meaning of the returned number silently depends on machine state, and any future change to the firmware's tip handling changes the result with no signal in our code. Reading the stop-disk Z explicitly and letting the caller branch on request_tip_presence keeps the tip logic legible and owned in Python, at the cost of N round-trips instead of one. For the iSWAP collision use case correctness and clarity matter more than the extra round-trips.

Motivated by the upcoming iSWAP move_y channel-collision check, which needs each channel's Z to decide whether it sits in the arm's swept band.

Also adds a TODO(v1) to rename request_probe_z_position to request_stop_disk_z_position, aligning it with move_channel_stop_disk_z and the new bulk reader.

🤖 Generated with Claude Code

BioCam and others added 2 commits May 22, 2026 15:22
…ead)

Reads each channel's stop-disk Z (the bare probe, excluding any mounted tip)
by fanning out the per-channel `request_probe_z_position` read, which has no
master-level equivalent. Mirrors the single-channel stop-disk / tip-bottom
split at the all-channel level.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@BioCam BioCam merged commit be6becf into PyLabRobot:main May 22, 2026
21 checks passed
@BioCam BioCam deleted the expose-channels-request-stop-disk-z-positions branch May 22, 2026 14:47
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.

1 participant