Skip to content

STARBackend: 96-head Y/Z drive speed & acceleration set/request, scoped to each move#1088

Open
BioCam wants to merge 2 commits into
PyLabRobot:mainfrom
BioCam:head96-speed-accel-pr
Open

STARBackend: 96-head Y/Z drive speed & acceleration set/request, scoped to each move#1088
BioCam wants to merge 2 commits into
PyLabRobot:mainfrom
BioCam:head96-speed-accel-pr

Conversation

@BioCam

@BioCam BioCam commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Adds set/request for the 96-head Y and Z drive speed and acceleration (H0 AA / H0 RA), and uses them so a move's speed and acceleration are scoped to that single call. Builds on #1086 (the Z move primitives) and #1087 (the per-drive defaults).

A ZA / YA move writes its speed and acceleration into the drive's volatile register and leaves them there, so a later move - or a C0-level command (aspirate96 / dispense96) that sends none of its own - silently inherits the previous move's values. Confirmed on hardware: a speed=20 Z move reads zv back as 20.

  • head96_set_y_speed / head96_set_y_acceleration / head96_set_z_speed / head96_set_z_acceleration (H0 AA): save a persistent drive parameter standalone, no move - the same mechanism slow_iswap uses on the iSWAP via R0 AA.
  • head96_request_y_speed / head96_request_y_acceleration / head96_request_z_speed / head96_request_z_acceleration (H0 RA): the read counterparts.
  • head96_move_stop_disk_z and head96_move_y reset the drive speed/acceleration to the head's default after the move, skipping the reset when the caller left a parameter at its default (so a plain move adds no register writes); reset_z_parameters / reset_y_parameters opt out.
  • head96_move_stop_disk_z retracts to Z-safety on any firmware error (e.g. the head crashing into something) before re-raising, via retract_on_crash; head96_move_to_z_safety passes it False so the retract cannot recurse.

Behaviour change to note for review: head96_move_y's speed / acceleration now default to None (resolving to the firmware default, e.g. 390.62 mm/s) instead of a hardcoded 300, matching head96_move_stop_disk_z.

Validated on hardware: RA reads match the firmware-resolved defaults in Head96Information, and an AA set followed by RA round-trips exactly.

BioCam and others added 2 commits June 11, 2026 17:40
…A/RA

Add head96_set_y_speed / head96_set_y_acceleration / head96_set_z_speed / head96_set_z_acceleration, each saving the persistent drive parameter (yv/yr/zv/zr) standalone via H0 AA - no move - so subsequent moves (including the C0-level 96-head commands) inherit it, the same mechanism slow_iswap uses with R0 AA on wv/tv.
Add the read counterparts head96_request_y_speed / _y_acceleration / _z_speed / _z_acceleration via H0 RA, with z-acceleration inverting the firmware-version scaling that the setter applies.
Validation mirrors the existing move methods; setters are @_requires_head96, getters unguarded.

NOTE: unverified on hardware - that AA accepts these parameter names and RA reads them back in the assumed field widths is inferred by analogy to slow_iswap; confirm with a set/request round-trip on the device.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…retract Z on crash

A ZA/YA move leaves its speed and acceleration in the drive's volatile register, so a later move
or C0-level command inherits them (confirmed on hardware: a speed=20 Z move reads zv back as 20).
head96_move_stop_disk_z and head96_move_y reset the drive parameters to the head's default after
the move, skipping the reset for parameters the caller left at default (no churn on plain moves);
reset_z_parameters / reset_y_parameters opt out.

head96_move_stop_disk_z retracts to Z-safety on any firmware error before re-raising, via
retract_on_crash (head96_move_to_z_safety passes False so the retract cannot recurse).

head96_move_y speed/acceleration now default to None (firmware default) instead of 300, matching
head96_move_stop_disk_z.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BioCam BioCam requested a review from rickwierenga June 11, 2026 21:24
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