BenchCel4R: v1 Agilent BenchCel device on the Stacker capability#1143
Open
c-reiter wants to merge 2 commits into
Open
BenchCel4R: v1 Agilent BenchCel device on the Stacker capability#1143c-reiter wants to merge 2 commits into
BenchCel4R: v1 Agilent BenchCel device on the Stacker capability#1143c-reiter wants to merge 2 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks the Agilent BenchCel 4R as a v1
Devicecomposing theStackercapability (#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 LIFOResourceStackstacks + loading tray and composesself.stacker = Stacker(backend=driver, stacks=…, loading_tray=…), wired into theDevicesetup/stop lifecycle (mirrors the v1Liconic).BenchCel4RBackend(Driver, StackerBackend)(driver.py) speaks the reverse-engineered binary TCP/7612 protocol (frames, sensors, teachpoints, labware push) and implements the capability'sdownstack/upstacktransfers;set_stackslets the device register the stacks (like Liconic'sset_racks).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:
pylabrobot/storage/agilent/*→pylabrobot/agilent/benchcel/*(v1 layout);MachineBackend→(Driver, StackerBackend),setup()→setup(backend_params=None);Stackerfrontend → v1BenchCel4Rdevice composing the capability;Plate.stacking_z_heightpreference (not onv1b1yet) —StackingThicknessfalls back to the height-based estimate.Tests
45 pass (driver protocol/frames/sensors, labware, device composition + capability wiring, mock server). ruff + mypy clean.
Notes
StackerRetrieval: v1 sequential-storage capability (sharesAutomatedRetrievalwithRandomAccessRetrieval) #1142 (theStackercapability): this PR's diff includesStackerRetrieval: v1 sequential-storage capability (sharesAutomatedRetrievalwithRandomAccessRetrieval) #1142's files until it merges intov1b1; merge orderStackerRetrieval: v1 sequential-storage capability (sharesAutomatedRetrievalwithRandomAccessRetrieval) #1142 → this.Refs #1113.