Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): Return overpressure errors from aspirate and wait for their recovery #15352

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Jun 5, 2024

Overview

Closes EXEC-376.

Test plan

Run a protocol that aspirate()s. Hold the well plate against the nozzles to induce an overpressure error.

from opentrons import protocol_api

requirements = {
    "apiLevel": "2.18",
    "robotType": "Flex",
}


def run(protocol: protocol_api.ProtocolContext) -> None:
    tip_rack = protocol.load_labware("opentrons_flex_96_tiprack_1000ul", "D2")
    well_plate = protocol.load_labware("nest_96_wellplate_100ul_pcr_full_skirt", "C3")

    protocol.load_trash_bin("A3")

    pipette = protocol.load_instrument("flex_96channel_1000")

    pipette.configure_nozzle_layout(protocol_api.COLUMN, start="A1")
    pipette.pick_up_tip(tip_rack["A12"])
    for _ in range(10):
        pipette.move_to(well_plate["A1"].bottom(-0.5))
        pipette.aspirate(1000)
        pipette.move_to(well_plate["A1"].top())
        pipette.blow_out()
    pipette.drop_tip()

With this PR, the run should pause and await recovery.

If you proceed to the next step, and that step is a blowout or home, the protocol should do that and then continue as normal. It will currently raise a MustHomeError for reasons that we think are related to firmware, and that we're looking into separately.

Changelog

  • Update the Protocol Engine aspirate command so that if it encounters an overpressure during the actual aspirate step, it swallows the exception, converts it to a defined overpressure error, and returns it.
  • Update our error recovery policy to put the run in an awaiting-recovery state when this happens.
  • Update PAPI's bindings to Protocol Engine to wait for any potential error recovery to complete before returning from the aspirate().

Review requests

None in particular.

Risk assessment

Low.

@SyntaxColoring SyntaxColoring changed the base branch from edge to overpressure_error_handling June 5, 2024 22:16
@SyntaxColoring SyntaxColoring force-pushed the return_overpressure_errors branch from eab6a81 to 88e0458 Compare June 6, 2024 21:41
@SyntaxColoring SyntaxColoring changed the base branch from overpressure_error_handling to edge June 6, 2024 22:18
@SyntaxColoring SyntaxColoring force-pushed the return_overpressure_errors branch from 88e0458 to b86fc7f Compare June 6, 2024 22:19
@SyntaxColoring SyntaxColoring requested a review from a team June 6, 2024 22:25
@SyntaxColoring SyntaxColoring marked this pull request as ready for review June 6, 2024 22:25
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner June 6, 2024 22:25
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, exciting one to merge!

@SyntaxColoring SyntaxColoring merged commit 43251e1 into edge Jun 7, 2024
20 checks passed
@SyntaxColoring SyntaxColoring deleted the return_overpressure_errors branch June 7, 2024 14:02
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.

2 participants