Skip to content

BenchCel4R: v1 Agilent BenchCel device on the Stacker capability#1143

Open
c-reiter wants to merge 2 commits into
PyLabRobot:v1b1from
c-reiter:v1-benchcel
Open

BenchCel4R: v1 Agilent BenchCel device on the Stacker capability#1143
c-reiter wants to merge 2 commits into
PyLabRobot:v1b1from
c-reiter:v1-benchcel

Conversation

@c-reiter

@c-reiter c-reiter commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Reworks the Agilent BenchCel 4R as a v1 Device composing the Stacker capability (#1142), per the #1113 discussion and @rickwierenga's steer to build this on v1 rather than v0.

  • BenchCel4R(Resource, Device) (pylabrobot/agilent/benchcel/benchcel.py) owns its four LIFO ResourceStack stacks + loading tray and composes self.stacker = Stacker(backend=driver, stacks=…, loading_tray=…), wired into the Device setup/stop lifecycle (mirrors the v1 Liconic).
  • BenchCel4RBackend(Driver, StackerBackend) (driver.py) speaks the reverse-engineered binary TCP/7612 protocol (frames, sensors, teachpoints, labware push) and implements the capability's downstack/upstack transfers; set_stacks lets the device register the stacks (like Liconic's set_racks).
  • Calculation-based labware helpers, benchcel_4r_stacks(), and an in-process mock server come along.

Provenance / adaptation

Ported wholesale from the v0 implementation (PR #1109, now to be closed) and adapted to v1:

  • moved pylabrobot/storage/agilent/*pylabrobot/agilent/benchcel/* (v1 layout);
  • driver base MachineBackend(Driver, StackerBackend), setup()setup(backend_params=None);
  • v0 factory returning a Stacker frontend → v1 BenchCel4R device composing the capability;
  • dropped the Plate.stacking_z_height preference (not on v1b1 yet) — StackingThickness falls back to the height-based estimate.

Tests

45 pass (driver protocol/frames/sensors, labware, device composition + capability wiring, mock server). ruff + mypy clean.

Notes

Refs #1113.

c-reiter and others added 2 commits July 2, 2026 16:08
…tedRetrieval`

Adds `Stacker`, the sequential ("stacking access") counterpart of the
random-access `AutomatedRetrieval` capability, per the PyLabRobot#1113 discussion:
Rick asked for a v1 `Capability` (not a v0 `Machine`) that shares code with
the now-more-complete `AutomatedRetrieval`.

- `LoadingTrayRetrieval` (new base): owns the loading tray and the small
  amount of plate-movement plumbing both retrieval capabilities share
  (loading-tray access + the summary table). `AutomatedRetrieval` now
  extends it (its public API is unchanged; ~50 lines lighter).
- `Stacker(LoadingTrayRetrieval)`: one or more single-ended LIFO
  `ResourceStack` stacks; `downstack(stack)` moves the accessible (top)
  plate onto the loading tray, `upstack(stack, plate=None)` moves a plate
  from the tray onto a stack.
- `StackerBackend(CapabilityBackend)` with `downstack`/`upstack`, plus
  `StackerChatterboxBackend` and tests.

Intended for the Agilent BenchCel and HighRes MicroServe. Refs PyLabRobot#1113.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reworks the Agilent BenchCel 4R as a v1 `Device` (per the PyLabRobot#1113 discussion
and Rick's steer): `BenchCel4R(Resource, Device)` owns its four LIFO
`ResourceStack` stacks + loading tray and composes the `Stacker` capability;
the driver `BenchCel4RBackend(Driver, StackerBackend)` speaks the
reverse-engineered binary TCP/7612 protocol and implements the capability's
`downstack`/`upstack` transfers.

Ported wholesale from the v0 implementation (closed PyLabRobot#1109) and adapted to
v1: moved to `pylabrobot/agilent/benchcel/` (driver.py / benchcel.py /
labware.py / stacks.py / mock_server.py), driver base `MachineBackend` ->
`(Driver, StackerBackend)`, factory -> device composing the capability. The
`Plate.stacking_z_height` preference is dropped for now (not on v1b1);
StackingThickness falls back to the height-based estimate.

Refs PyLabRobot#1113.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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