Skip to content

Commit 36c26a9

Browse files
committed
adding docstrings to robot.head_speed
1 parent 08ed79c commit 36c26a9

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/source/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Robot
1313
All protocols are set up, simulated and executed using a Robot class.
1414

1515
.. autoclass:: Robot
16-
:members: connect, home, reset, run, simulate, commands, move_to, containers, actions, disconnect, pause, resume, stop, diagnostics, get_warnings, add_instrument, get_mosfet, get_motor
16+
:members: connect, home, reset, run, simulate, commands, move_to, containers, actions, disconnect, head_speed, pause, resume, stop, diagnostics, get_warnings, add_instrument, get_mosfet, get_motor
1717

1818
Pipette
1919
-----------------

opentrons/robot/robot.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class Robot(object, metaclass=Singleton):
3131
* :meth:`run` the protocol on a robot
3232
* :meth:`home` axis, move head (:meth:`move_to`)
3333
* :meth:`pause` and :func:`resume` the protocol run
34+
* set the :meth:`head_speed` of the robot
3435
3536
Each Opentrons protocol is a Python script. When evaluated the script
3637
creates an execution plan which is stored as a list of commands in
@@ -497,6 +498,26 @@ def move_plunger(self, *args, **kwargs):
497498
self._driver.move_plunger(*args, **kwargs)
498499

499500
def head_speed(self, rate):
501+
"""
502+
Set the XY axis speeds of the robot, set in millimeters per minute
503+
504+
Parameters
505+
----------
506+
rate : int
507+
An integer setting the mm/minute rate of the X and Y axis.
508+
Speeds too fast (around 6000 and higher) will cause the robot
509+
to skip step, be careful when using this method
510+
511+
Examples
512+
--------
513+
>>> from opentrons import robot
514+
>>> robot.connect('Virtual Smoothie')
515+
True
516+
>>> robot.home()
517+
True
518+
>>> robot.head_speed(4500)
519+
>>> robot.move_head(x=200, y=200)
520+
"""
500521
self._driver.set_head_speed(rate)
501522

502523
@traceable('move-to')

0 commit comments

Comments
 (0)