Skip to content

Support OT-2 GEN2 eight-channel full-head operations - #1466

Open
hazlamshamin wants to merge 2 commits into
mainfrom
feat/ot2-eight-channel-upstream
Open

hazlamshamin wants to merge 2 commits into
mainfrom
feat/ot2-eight-channel-upstream

Conversation

@hazlamshamin

Copy link
Copy Markdown
Collaborator

Summary

Add opt-in, full-head operation for OT-2 P20 and P300 GEN2 eight-channel pipettes through the existing legacy liquid-handler APIs. Set fixed_head_mount to "left" or "right" to select the pipette.

  • Require channels 0 through 7 together, aligned A-to-H columns at 9 mm pitch, and shared nozzle settings. Volumes are per nozzle: 1–20 µL for P20 and 20–300 µL for P300.
  • Preserve per-nozzle tip and liquid tracking. Reject invalid requests before dispatch and roll back tip transactions queued before a later validation failure.
  • Exercise the backend's validation and dispatch through the chatterbox. The default mount-based channel mapping remains unchanged when fixed_head_mount is unset.
  • Restore saved tip liquid state without creating a pending transaction from matching committed and pending tips. Retain resource-tree ownership and the saved state format. This fix is a separate commit.

The selected mount exposes all eight nozzles. It does not expose the other mount.

Scope and hardware limits

Opentrons supports partial tip pickup in its Python API from API level 2.20 and in Protocol Designer. An OT-2 eight-channel pipette can use a single nozzle at either end: A1 or H1. Partial columns use 2–7 consecutive nozzles from H1 toward A1. These layouts do not support gaps or partial columns starting at A1.

This integration deliberately supports all eight nozzles only. Partial layouts require a separate client/backend contract for layout configuration, anchor selection, and tip tracking. The selected ot_api client has no dedicated nozzle-layout helper. Its generic command API can submit additional command types, so a transport change is not necessarily required.

The OT-2 head has fixed 9 mm nozzle spacing. Partial tip pickup does not change that spacing. In contrast, PLR supports independent Y positioning of Hamilton STAR pipetting channels, as shown in its channel movement example. This OT-2 integration does not support adjustable spacing.

Verification

Checks used the candidate source tree:

  • python -m pytest -q pylabrobot/legacy/liquid_handling pylabrobot/resources pylabrobot/legacy/tip_tracker_tests.py — 883 passed, 8 skipped, and 300 subtests passed. The skipped tests were unchanged.
  • python -m ruff check and python -m ruff check --select I — passed for the eight changed Python files.
  • python -m ruff format --check — passed for the eight changed Python files.
  • python -m mypy --follow-imports=silent --ignore-missing-imports — passed for the five changed source files. This was a scoped check, not the full repository type check.

A direct PLR hardware run completed on a left-mounted P300 GEN2 with standard Opentrons 300 µL tips and a NEST 96-well, 200 µL flat-bottom plate. The run exercised full-column tip pickup, mixing, water transfers of 20 and 150 µL per nozzle, and tip disposal. The operator confirmed physical completion. This was a functional check, not a measurement of pipetting accuracy.

P20 GEN2 and right-mount operation have software coverage only. The full repository test suite and CI matrix did not run locally.

hazlamshamin added 2 commits October 3, 2026 05:19
Compare committed and pending tips before attaching either tip to its
holder. Attachment changes resource placement and must not create a
pending transaction from an unchanged committed state.

Restore the committed tip's saved liquid state through its volume
tracker. Reuse the same tip instance when committed and pending states
match. Preserve distinct pending operations for commit or rollback.

Keep physical tip custody in the resource tree and retain the saved
state format.
Add an optional fixed_head_mount to select a P20 or P300 GEN2 pipette.
Use the existing tip and liquid APIs with channels 0 through 7 together.
Require aligned A-to-H columns at 9 mm pitch and shared nozzle settings.

Validate the complete request before dispatch. Roll back queued tip
transactions if a later channel fails validation. Keep per-nozzle liquid
tracking while the backend operates the physical head as one unit.

Use the same backend validation and dispatch in the chatterbox. Preserve
the default mount-based channel mapping when fixed_head_mount is unset.

OT-2 nozzles have fixed 9 mm spacing, unlike Hamilton STAR's independently
positioned pipetting channels. Official Opentrons protocols support
partial tip pickup, but this integration deliberately requires all eight
nozzles. Partial layouts need separate client and backend support.
@hazlamshamin
hazlamshamin requested a review from a team as a code owner October 2, 2026 21:21

This branch has not been deployed

No deployments
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