Skip to content

Commit e76cde2

Browse files
ryanthecodergithub-actions[bot]sfoster1
authored
chore(api): only auto liquid probe with clean tips (#17808)
<!-- Thanks for taking the time to open a Pull Request (PR)! Please make sure you've read the "Opening Pull Requests" section of our Contributing Guide: https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests GitHub provides robust markdown to format your PR. Links, diagrams, pictures, and videos along with text formatting make it possible to create a rich and informative PR. For more information on GitHub markdown, see: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax To ensure your code is reviewed quickly and thoroughly, please fill out the sections below to the best of your ability! --> # Overview If a tip is "wet" it can trigger a false positive, or worse, pull up any remnant drops into the stem. This adds a variant of the "empty" state of to the pipette state called "clean". When a tip is picked up it now marks it as "clean" instead of empty. This just sets the clean flag in the state and otherwise does the same thing as empty. Any subsequent liquid action marks the "clean" state as false. <!-- Describe your PR at a high level. State acceptance criteria and how this PR fits into other work. Link issues, PRs, and other relevant resources. --> ## Test Plan and Hands on Testing <!-- Describe your testing of the PR. Emphasize testing not reflected in the code. Attach protocols, logs, screenshots and any other assets that support your testing. --> ## Changelog <!-- List changes introduced by this PR considering future developers and the end user. Give careful thought and clear documentation to breaking changes. --> ## Review requests <!-- - What do you need from reviewers to feel confident this PR is ready to merge? - Ask questions. --> ## Risk assessment <!-- - Indicate the level of attention this PR needs. - Provide context to guide reviewers. - Discuss trade-offs, coupling, and side effects. - Look for the possibility, even if you think it's small, that your change may affect some other part of the system. - For instance, changing return tip behavior may also change the behavior of labware calibration. - How do your unit tests and on hands on testing mitigate this PR's risks and the risk of future regressions? - Especially in high risk PRs, explain how you know your testing is enough. --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: sfoster1 <[email protected]>
1 parent 05c5458 commit e76cde2

18 files changed

+334
-438
lines changed

analyses-snapshot-testing/tests/__snapshots__/analyses_snapshot_test/test_analysis_snapshot[2b866b03f3][Flex_S_v2_21_P1000_96_GRIP_HS_MB_TC_TM_Smoke].json

+169-361
Large diffs are not rendered by default.

analyses-snapshot-testing/tests/__snapshots__/analyses_snapshot_test/test_analysis_snapshot[d2c818bf00][Flex_S_v2_20_P50_LPD].json

+26-58
Original file line numberDiff line numberDiff line change
@@ -4461,44 +4461,12 @@
44614461
"startedAt": "TIMESTAMP",
44624462
"status": "succeeded"
44634463
},
4464-
{
4465-
"commandType": "liquidProbe",
4466-
"completedAt": "TIMESTAMP",
4467-
"createdAt": "TIMESTAMP",
4468-
"id": "UUID",
4469-
"key": "8a6371348d39f444fc65e7304dde52ce",
4470-
"notes": [],
4471-
"params": {
4472-
"labwareId": "UUID",
4473-
"pipetteId": "UUID",
4474-
"wellLocation": {
4475-
"offset": {
4476-
"x": 0.0,
4477-
"y": 0.0,
4478-
"z": 2.0
4479-
},
4480-
"origin": "top",
4481-
"volumeOffset": 0.0
4482-
},
4483-
"wellName": "A3"
4484-
},
4485-
"result": {
4486-
"position": {
4487-
"x": 360.38,
4488-
"y": 256.78,
4489-
"z": 33.4
4490-
},
4491-
"z_position": "SimulatedProbeResult"
4492-
},
4493-
"startedAt": "TIMESTAMP",
4494-
"status": "succeeded"
4495-
},
44964464
{
44974465
"commandType": "aspirate",
44984466
"completedAt": "TIMESTAMP",
44994467
"createdAt": "TIMESTAMP",
45004468
"id": "UUID",
4501-
"key": "b22e2f859d148b4dfdb91b3e43ddd7c0",
4469+
"key": "778e826c901184eabfcc20d2b5a2e49f",
45024470
"notes": [],
45034471
"params": {
45044472
"flowRate": 35.0,
@@ -4532,7 +4500,7 @@
45324500
"completedAt": "TIMESTAMP",
45334501
"createdAt": "TIMESTAMP",
45344502
"id": "UUID",
4535-
"key": "d7b826433bfc2c5dd7650b7f64de4387",
4503+
"key": "38675e4e928860df768c3e85d5768603",
45364504
"notes": [],
45374505
"params": {
45384506
"flowRate": 57.0,
@@ -4566,7 +4534,7 @@
45664534
"completedAt": "TIMESTAMP",
45674535
"createdAt": "TIMESTAMP",
45684536
"id": "UUID",
4569-
"key": "45c70122bf33abff61217f0c752c06a4",
4537+
"key": "b4caf3b2661bcba8f6a838f6ea450075",
45704538
"notes": [],
45714539
"params": {
45724540
"addressableAreaName": "movableTrashA3",
@@ -4595,7 +4563,7 @@
45954563
"completedAt": "TIMESTAMP",
45964564
"createdAt": "TIMESTAMP",
45974565
"id": "UUID",
4598-
"key": "440594c1295a83478b3bf55db1efc12d",
4566+
"key": "2b7db72bdd89db19f1ed47e67528f28b",
45994567
"notes": [],
46004568
"params": {
46014569
"pipetteId": "UUID"
@@ -4609,7 +4577,7 @@
46094577
"completedAt": "TIMESTAMP",
46104578
"createdAt": "TIMESTAMP",
46114579
"id": "UUID",
4612-
"key": "dbeb059b62f722adf17e49167171024f",
4580+
"key": "41dbfe52d75d3788b387c0d9338e34ea",
46134581
"notes": [],
46144582
"params": {
46154583
"message": "Reservoir in D3 is to have NO liquid"
@@ -4623,7 +4591,7 @@
46234591
"completedAt": "TIMESTAMP",
46244592
"createdAt": "TIMESTAMP",
46254593
"id": "UUID",
4626-
"key": "04ea53a488348ffb1688af708b65f7e4",
4594+
"key": "4b3f9b7518054b692c5325c9f314bbc2",
46274595
"notes": [],
46284596
"params": {
46294597
"labwareId": "UUID",
@@ -4656,7 +4624,7 @@
46564624
"completedAt": "TIMESTAMP",
46574625
"createdAt": "TIMESTAMP",
46584626
"id": "UUID",
4659-
"key": "e94242544868a35ba08cec280d753bc6",
4627+
"key": "1263b3f609a7880eaa95c752e2bd475d",
46604628
"notes": [],
46614629
"params": {
46624630
"flowRate": 35.0,
@@ -4690,7 +4658,7 @@
46904658
"completedAt": "TIMESTAMP",
46914659
"createdAt": "TIMESTAMP",
46924660
"id": "UUID",
4693-
"key": "ef6736559fde071db453f5eab377a125",
4661+
"key": "909c08dccafd36971e0152dd6e1a8139",
46944662
"notes": [],
46954663
"params": {
46964664
"addressableAreaName": "movableTrashA3",
@@ -4719,7 +4687,7 @@
47194687
"completedAt": "TIMESTAMP",
47204688
"createdAt": "TIMESTAMP",
47214689
"id": "UUID",
4722-
"key": "57ecb3ed1ba19f712a64f34d0098c991",
4690+
"key": "d100078485070fc9ffbd5402abc866cc",
47234691
"notes": [],
47244692
"params": {
47254693
"flowRate": 57.0,
@@ -4734,7 +4702,7 @@
47344702
"completedAt": "TIMESTAMP",
47354703
"createdAt": "TIMESTAMP",
47364704
"id": "UUID",
4737-
"key": "ff5d401da9025c5e29c5687c101a5e3d",
4705+
"key": "fd14cf1ab3d29a1beb839f773714c75c",
47384706
"notes": [],
47394707
"params": {
47404708
"message": "Current volume in pipette: 0"
@@ -4748,7 +4716,7 @@
47484716
"completedAt": "TIMESTAMP",
47494717
"createdAt": "TIMESTAMP",
47504718
"id": "UUID",
4751-
"key": "d4d7653c4ef95313ee313641835096ad",
4719+
"key": "6d4749de29e5b16690b4c24357519c71",
47524720
"notes": [],
47534721
"params": {
47544722
"pipetteId": "UUID"
@@ -4762,7 +4730,7 @@
47624730
"completedAt": "TIMESTAMP",
47634731
"createdAt": "TIMESTAMP",
47644732
"id": "UUID",
4765-
"key": "572506e8a901de4c31b05824435605e3",
4733+
"key": "785e9be5b17c72f142d39f03297bc799",
47664734
"notes": [],
47674735
"params": {
47684736
"labwareId": "UUID",
@@ -4794,7 +4762,7 @@
47944762
"completedAt": "TIMESTAMP",
47954763
"createdAt": "TIMESTAMP",
47964764
"id": "UUID",
4797-
"key": "99ff896a8dd377c6b88d73e413dd83fb",
4765+
"key": "7ccc6abf8a3db11ce7e6acd5aad7c371",
47984766
"notes": [],
47994767
"params": {
48004768
"message": "Is there liquid in the reservoir? True"
@@ -4808,7 +4776,7 @@
48084776
"completedAt": "TIMESTAMP",
48094777
"createdAt": "TIMESTAMP",
48104778
"id": "UUID",
4811-
"key": "f3ad90410318c85bdafc440398099b1c",
4779+
"key": "b3a1a14a2952fffaa3ffec6b16057ee7",
48124780
"notes": [],
48134781
"params": {
48144782
"addressableAreaName": "movableTrashA3",
@@ -4837,7 +4805,7 @@
48374805
"completedAt": "TIMESTAMP",
48384806
"createdAt": "TIMESTAMP",
48394807
"id": "UUID",
4840-
"key": "5f601c702191a47b8e0e0d99ae514a34",
4808+
"key": "f3cca7482c4018c4ef6df79c1803b756",
48414809
"notes": [],
48424810
"params": {
48434811
"pipetteId": "UUID"
@@ -4851,7 +4819,7 @@
48514819
"completedAt": "TIMESTAMP",
48524820
"createdAt": "TIMESTAMP",
48534821
"id": "UUID",
4854-
"key": "3d627373932d2d82fdee646567e0aa8e",
4822+
"key": "c6c070d903d15619cb5558c1ca1c2686",
48554823
"notes": [],
48564824
"params": {
48574825
"labwareId": "UUID",
@@ -4884,7 +4852,7 @@
48844852
"completedAt": "TIMESTAMP",
48854853
"createdAt": "TIMESTAMP",
48864854
"id": "UUID",
4887-
"key": "286f5eaff085f0888fa20b1f7e6ea0d8",
4855+
"key": "98193cec066e166983e2f35c505411f3",
48884856
"notes": [],
48894857
"params": {
48904858
"message": "We expect an error on the next line"
@@ -4898,7 +4866,7 @@
48984866
"completedAt": "TIMESTAMP",
48994867
"createdAt": "TIMESTAMP",
49004868
"id": "UUID",
4901-
"key": "f0ce6617868dd419408be36fa2c9b687",
4869+
"key": "9805906fd76d9e4ea5b48c4dd4a47f11",
49024870
"notes": [],
49034871
"params": {
49044872
"labwareId": "UUID",
@@ -4930,7 +4898,7 @@
49304898
"completedAt": "TIMESTAMP",
49314899
"createdAt": "TIMESTAMP",
49324900
"id": "UUID",
4933-
"key": "d184edc87ae8067624e33f43a08fe0c3",
4901+
"key": "945ed7582aa88ad9af48034e185e78cb",
49344902
"notes": [],
49354903
"params": {
49364904
"flowRate": 35.0,
@@ -4964,7 +4932,7 @@
49644932
"completedAt": "TIMESTAMP",
49654933
"createdAt": "TIMESTAMP",
49664934
"id": "UUID",
4967-
"key": "7e96f475215267b1f53e6431009b68f9",
4935+
"key": "cda1a90c5d9583258d101cde416ac69c",
49684936
"notes": [],
49694937
"params": {
49704938
"addressableAreaName": "movableTrashA3",
@@ -4993,7 +4961,7 @@
49934961
"completedAt": "TIMESTAMP",
49944962
"createdAt": "TIMESTAMP",
49954963
"id": "UUID",
4996-
"key": "36e0b46690493b64dea41f3d6c27e266",
4964+
"key": "3c43bc864ede9c53854dc16d03e83237",
49974965
"notes": [],
49984966
"params": {
49994967
"pipetteId": "UUID"
@@ -5007,7 +4975,7 @@
50074975
"completedAt": "TIMESTAMP",
50084976
"createdAt": "TIMESTAMP",
50094977
"id": "UUID",
5010-
"key": "2c58bd55bfad83d78f2859e636ee2723",
4978+
"key": "3412243e76c37f838b113e7eb6b592ac",
50114979
"notes": [],
50124980
"params": {
50134981
"labwareId": "UUID",
@@ -5040,7 +5008,7 @@
50405008
"completedAt": "TIMESTAMP",
50415009
"createdAt": "TIMESTAMP",
50425010
"id": "UUID",
5043-
"key": "c713a0160a4176161ba486b32b07d0dd",
5011+
"key": "67e7abea27e463d130e20a1b519ccb68",
50445012
"notes": [],
50455013
"params": {
50465014
"message": "Reservoir in D3 is to have NO liquid"
@@ -5054,7 +5022,7 @@
50545022
"completedAt": "TIMESTAMP",
50555023
"createdAt": "TIMESTAMP",
50565024
"id": "UUID",
5057-
"key": "ecd85454102ce7575176fc1430b9854f",
5025+
"key": "8b1fcd8c6726c9cbe49ad45391015980",
50585026
"notes": [],
50595027
"params": {
50605028
"labwareId": "UUID",
@@ -5086,7 +5054,7 @@
50865054
"completedAt": "TIMESTAMP",
50875055
"createdAt": "TIMESTAMP",
50885056
"id": "UUID",
5089-
"key": "1bae2c05e983ffa93cb1e081d438f8ef",
5057+
"key": "ecce1348844aa390a8de623d60b09b4c",
50905058
"notes": [],
50915059
"params": {
50925060
"labwareId": "UUID",
@@ -5118,7 +5086,7 @@
51185086
"completedAt": "TIMESTAMP",
51195087
"createdAt": "TIMESTAMP",
51205088
"id": "UUID",
5121-
"key": "d249c3b29b22c37a6412d69a4c83b5c7",
5089+
"key": "86cd2f1c02989e5f6a8cdc3e02d98255",
51225090
"notes": [],
51235091
"params": {
51245092
"message": "Is there liquid in the reservoir? True"

api/src/opentrons/protocol_api/core/engine/instrument.py

+10
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,16 @@ def get_current_volume(self) -> float:
939939

940940
return current_volume or 0
941941

942+
def get_has_clean_tip(self) -> bool:
943+
try:
944+
clean_tip = self._engine_client.state.pipettes.get_has_clean_tip(
945+
self._pipette_id
946+
)
947+
except TipNotAttachedError:
948+
clean_tip = False
949+
950+
return clean_tip
951+
942952
def get_available_volume(self) -> float:
943953
try:
944954
available_volume = self._engine_client.state.pipettes.get_available_volume(

api/src/opentrons/protocol_api/core/instrument.py

+4
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ def get_working_volume(self) -> float:
252252
def get_current_volume(self) -> float:
253253
...
254254

255+
@abstractmethod
256+
def get_has_clean_tip(self) -> bool:
257+
...
258+
255259
@abstractmethod
256260
def get_available_volume(self) -> float:
257261
...

api/src/opentrons/protocol_api/core/legacy/legacy_instrument_core.py

+4
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ def get_current_volume(self) -> float:
500500
"""Get the current volume."""
501501
return self.get_hardware_state()["current_volume"]
502502

503+
def get_has_clean_tip(self) -> bool:
504+
"""Get if has a clean tip, only used with LLD and engine commands."""
505+
return False
506+
503507
def get_available_volume(self) -> float:
504508
"""Get the available volume."""
505509
return self.get_hardware_state()["available_volume"]

api/src/opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py

+3
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ def get_working_volume(self) -> float:
377377
def get_current_volume(self) -> float:
378378
return self._pipette_dict["current_volume"]
379379

380+
def get_has_clean_tip(self) -> bool:
381+
return False
382+
380383
def get_available_volume(self) -> float:
381384
return self._pipette_dict["available_volume"]
382385

api/src/opentrons/protocol_api/instrument_context.py

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ def aspirate(
271271
and self.liquid_presence_detection
272272
and self._core.nozzle_configuration_valid_for_lld()
273273
and self._core.get_current_volume() == 0
274+
and self._core.get_has_clean_tip()
274275
):
275276
self._raise_if_pressure_not_supported_by_pipette()
276277
self.require_liquid_presence(well=well)

api/src/opentrons/protocol_engine/commands/pick_up_tip.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ async def execute(
150150
pipette_id=pipette_id,
151151
tip_geometry=e.tip_geometry,
152152
)
153-
.set_fluid_empty(pipette_id=pipette_id)
153+
.set_fluid_empty(pipette_id=pipette_id, clean_tip=True)
154154
.mark_tips_as_used(
155155
pipette_id=pipette_id, labware_id=labware_id, well_name=well_name
156156
)
@@ -188,7 +188,7 @@ async def execute(
188188
.mark_tips_as_used(
189189
pipette_id=pipette_id, labware_id=labware_id, well_name=well_name
190190
)
191-
.set_fluid_empty(pipette_id=pipette_id)
191+
.set_fluid_empty(pipette_id=pipette_id, clean_tip=True)
192192
.set_pipette_ready_to_aspirate(
193193
pipette_id=pipette_id, ready_to_aspirate=True
194194
)

0 commit comments

Comments
 (0)