You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/docs/v2/robot_position.rst
+67-11Lines changed: 67 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,14 @@ Most of the time when executing a protocol, the Python Protocol API's methods ta
13
13
Position Relative to Labware
14
14
****************************
15
15
16
-
Every well on every piece of labware you load has three addressable positions — top, bottom, and center — that are determined by the labware definition. You can use these positions as-is or calculate other positions relative to them.
16
+
When you instruct the robot to move to a position on a piece of labware, the exact point in space it moves to is calculated based on the labware definition, the type of action the robot will perform there, and labware offsets for the specific deck slot on your robot. This section describes how each of these components of a position are calculated and methods for modifying them.
17
17
18
-
Top
19
-
===
18
+
Top, Bottom, and Center
19
+
=======================
20
20
21
-
The :py:meth:`.Well.top` method returns a position level with the top of the well, centered in both horizontal directions.
21
+
Every well on every piece of labware you load has three addressable positions — top, bottom, and center — that are determined by the labware definition and whether the labware is on a module or directly on the deck. You can use these positions as-is or calculate other positions relative to them.
22
+
23
+
:py:meth:`.Well.top` returns a position level with the top of the well, centered in both horizontal directions.
22
24
23
25
.. code-block:: python
24
26
@@ -33,10 +35,7 @@ This is a good position to use for :ref:`new-blow-out` or any other operation wh
33
35
34
36
.. versionadded:: 2.0
35
37
36
-
Bottom
37
-
======
38
-
39
-
The :py:meth:`.Well.bottom` method returns a position level with the bottom of the well, centered in both horizontal directions.
38
+
:py:meth:`.Well.bottom` returns a position level with the bottom of the well, centered in both horizontal directions.
40
39
41
40
.. code-block:: python
42
41
@@ -57,10 +56,8 @@ This is a good position to start for aspiration or any other operation where you
57
56
58
57
.. versionadded:: 2.0
59
58
60
-
Center
61
-
======
62
59
63
-
The :py:meth:`.Well.center` method returns a position centered in the well both vertically and horizontally. This can be a good place to start for precise control of positions within the well for unusual or custom labware.
60
+
:py:meth:`.Well.center` returns a position centered in the well both vertically and horizontally. This can be a good place to start for precise control of positions within the well for unusual or custom labware.
64
61
65
62
.. code-block:: python
66
63
@@ -113,6 +110,65 @@ Changing these attributes will affect all subsequent aspirate and dispense actio
113
110
.. versionadded:: 2.0
114
111
115
112
113
+
.. _using_lpc:
114
+
115
+
Using Labware Position Check
116
+
============================
117
+
118
+
All positions relative to labware are automatically adjusted based on the labware's offset, an x, y, z vector. The best way to calculate and apply these offsets is by using Labware Position Check when you run your protocol in the Opentrons App. As of version 6.0 of the app, you can apply previously calculated offsets — even across different protocols — as long as they are for the same type of labware in the same deck slot on the same robot.
119
+
120
+
You shouldn't adjust labware offsets in your Python code if you plan to run your protocol in the app. However, if you are running your protocol in Jupyter notebook or with ``opentrons_execute``, Labware Position Check is not directly available. For these applications, you can calculate and apply labware offsets by:
121
+
122
+
1. Creating a "dummy" protocol that loads your labware and has each used pipette pick up a tip from a tip rack
123
+
2. Importing the dummy protocol to the Opentrons App
124
+
3. Running Labware Position Check
125
+
4. Adding the offsets to your protocol
126
+
127
+
To prepare code written for Jupyter notebook so it can be run in the app, you need to include a metadata block and a ``run()`` function. And to enable Labware Position Check, you need to add a :py:meth:`.pick_up_tip` action for each pipette the protocol uses. For example, a dummy protocol using a P300 Single-Channel pipette, a reservoir, and a well plate would look like this:
After importing this protocol to the Opentrons App, run Labware Position Check to get the x, y, and z offsets for the tip rack and labware. When complete, you can click **Get Labware Offset Data** to view automatically generated code that uses :py:meth:`.set_offset` to apply the offsets to each piece of labware:
You'll notice that this code uses generic names for the loaded labware. If you want to match the labware names already in your protocol, add your own ``.set_offset()`` calls using the arguments provided by Labware Position Check:
Once you've executed this code in Jupyter notebook, all subsequent positional calculations for this reservoir in slot 2 will be adjusted 0.1 mm to the right, 0.2 mm to the back, and 0.3 mm up.
164
+
165
+
Remember, you should only add ``.set_offset()`` commands to protocols run outside of the Opentrons App. And you should follow the behavior of Labware Position Check: do not reuse offset measurements unless they apply to the *same labware* in the *same deck slot* on the *same robot*.
166
+
167
+
.. warning::
168
+
169
+
Improperly reusing offset data may cause your robot to move to unforeseen positions, including crashing on labware, which can lead to incorrect protocol execution or damage to your equipment. The same is true of running protocols with ``.set_offset()`` commands in the Opentrons App. When in doubt: run Labware Position Check again and update your code!
0 commit comments