From cdfe7a6e94205814252db2507400bf92ca2ca0fe Mon Sep 17 00:00:00 2001 From: Edward Cormany Date: Mon, 31 Jul 2023 00:33:03 -0400 Subject: [PATCH] first use_gripper example --- api/docs/v2/moving_labware.rst | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/api/docs/v2/moving_labware.rst b/api/docs/v2/moving_labware.rst index f4ae2b1ffcee..d59f9b26c353 100644 --- a/api/docs/v2/moving_labware.rst +++ b/api/docs/v2/moving_labware.rst @@ -24,16 +24,30 @@ Use the :py:meth:`.ProtocolContext.move_labware` method to initiate a move, rega The required arguments of ``move_labware()`` are the ``labware`` you want to move and its ``new_location``. You don't need to specify where the move begins, since that information is already stored in the :py:class:`Labware` object with the name ``plate``. That information gets updated when the move step is complete, so you can move a plate multiple times:: - protocol.move_labware(labware=plate, new_location='D2') - protocol.move_labware(labware=plate, new_location='D3') - + protocol.move_labware(labware=plate, new_location='D2') + protocol.move_labware(labware=plate, new_location='D3') + For the first move, the API knows to find the plate in its initial load location, slot D1. For the second move, the API knows to find the plate in D2. Automated vs Manual Moves ========================= +Opentrons Flex supports an additional ``use_gripper`` parameter of :py:meth:`~.ProtocolContext.move_labware` for moving labware with the gripper. Set its value to ``True`` to have the gripper pick up and move the labware without user intervention or pausing the protocol. The default value is ``False``, so if you don't specify a value, the protocol will pause for you to manually move the labware. +.. code-block:: python + + plate = protocol.load_labware('nest_96_wellplate_200ul_flat', 'D1') + # have the gripper move the plate from D1 to D2 + protocol.move_labware(labware=plate, new_location='D2', use_gripper=True) + # pause to move the plate manually from D2 to D3 + protocol.move_labware(labware=plate, new_location='D3', use_gripper=False) + # pause to move the plate manually from D3 to C1 + protocol.move_labware(labware=plate, new_location='C1') + +.. versionadded:: 2.15 + +All you have to do to specify that a protocol requires the gripper is to include a single ``move_labware()`` command with ``use_labware=True``. You don't have to load the gripper as an instrument, and there is no ``InstrumentContext`` for the gripper. .. note:: @@ -45,4 +59,5 @@ Movement with Modules The Off-Deck Location -===================== \ No newline at end of file +===================== +