From fdb05cd7ee5525f48bc16fd48be7ae0792b76dd0 Mon Sep 17 00:00:00 2001 From: caila-marashaj Date: Thu, 9 May 2024 10:57:50 -0400 Subject: [PATCH] only add tip if pickup successful --- api/src/opentrons/hardware_control/ot3api.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/api/src/opentrons/hardware_control/ot3api.py b/api/src/opentrons/hardware_control/ot3api.py index 5fedd5050ce..7f4fc569086 100644 --- a/api/src/opentrons/hardware_control/ot3api.py +++ b/api/src/opentrons/hardware_control/ot3api.py @@ -2153,11 +2153,16 @@ async def pick_up_tip( realmount = OT3Mount.from_mount(mount) instrument = self._pipette_handler.get_pipette(realmount) - def add_tip_to_instr() -> None: - instrument.add_tip(tip_length=tip_length) - instrument.set_current_volume(0) + async def add_tip_to_instr() -> None: if isinstance(self._backend, OT3Simulator): + instrument.add_tip(tip_length=tip_length) + instrument.set_current_volume(0) self._backend._update_tip_state(realmount, True) + else: + status = await self.get_tip_presence_status(mount, InstrumentProbeType.PRIMARY) + if status == TipStateType.PRESENT: + instrument.add_tip(tip_length=tip_length) + instrument.set_current_volume(0) await self._move_to_plunger_bottom(realmount, rate=1.0) if ( @@ -2195,7 +2200,7 @@ def add_tip_to_instr() -> None: realmount, top_types.Point(z=spec.ending_z_retract_distance) ) - add_tip_to_instr() + await add_tip_to_instr() if prep_after: await self.prepare_for_aspirate(realmount)