@@ -24,6 +24,13 @@ async def get_position(self, *, extra: Optional[Dict[str, Any]] = None, timeout:
2424 """
2525 Get the position in millimeters.
2626
27+ ::
28+
29+ my_gantry = Gantry.from_robot(robot=robot, name="my_gantry")
30+
31+ # Get the current positions of the axes of the gantry in millimeters.
32+ positions = await my_gantry.get_position()
33+
2734 Returns:
2835 List[float]: The position of the axes.
2936 """
@@ -42,6 +49,20 @@ async def move_to_position(
4249 """
4350 Move the gantry to a new position at the requested speeds.
4451
52+ ::
53+
54+ my_gantry = Gantry.from_robot(robot=robot, name="my_gantry")
55+
56+ # Create a list of positions for the axes of the gantry to move to. Assume in
57+ # this example that the gantry is multi-axis, with 3 axes.
58+ examplePositions = [1, 2, 3]
59+
60+ exampleSpeeds = [3, 9, 12]
61+
62+ # Move the axes of the gantry to the positions specified.
63+ await my_gantry.move_to_position(
64+ positions=examplePositions, speeds=exampleSpeeds)
65+
4566 Args:
4667 positions (List[float]): List of positions for the axes to move to,
4768 in millimeters.
@@ -53,6 +74,12 @@ async def home(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optiona
5374 """
5475 Home the gantry to find it's starting and ending positions
5576
77+ ::
78+
79+ my_gantry = Gantry.from_robot(robot=robot, name="my_gantry")
80+
81+ await my_gantry.home()
82+
5683 Returns:
5784 bool : whether the gantry has run the homing sequence successfully
5885 """
@@ -62,6 +89,13 @@ async def get_lengths(self, *, extra: Optional[Dict[str, Any]] = None, timeout:
6289 """
6390 Get the lengths of the axes of the gantry in millimeters.
6491
92+ ::
93+
94+ my_gantry = Gantry.from_robot(robot=robot, name="my_gantry")
95+
96+ # Get the lengths of the axes of the gantry in millimeters.
97+ lengths_mm = await my_gantry.get_lengths()
98+
6599 Returns:
66100 List[float]: The lengths of the axes.
67101 """
@@ -71,6 +105,15 @@ async def get_lengths(self, *, extra: Optional[Dict[str, Any]] = None, timeout:
71105 async def stop (self , * , extra : Optional [Dict [str , Any ]] = None , timeout : Optional [float ] = None , ** kwargs ):
72106 """
73107 Stop all motion of the gantry. It is assumed that the gantry stops immediately.
108+
109+ ::
110+
111+ my_gantry = Gantry.from_robot(robot=robot, name="my_gantry")
112+
113+ # Stop all motion of the gantry. It is assumed that the gantry stops
114+ # immediately.
115+ await my_gantry.stop()
116+
74117 """
75118 ...
76119
@@ -79,6 +122,17 @@ async def is_moving(self) -> bool:
79122 """
80123 Get if the gantry is currently moving.
81124
125+ ::
126+
127+ my_gantry = Gantry.from_robot(robot=robot, name="my_gantry")
128+
129+ # Stop all motion of the gantry. It is assumed that the
130+ # gantry stops immediately.
131+ await my_gantry.stop()
132+
133+ # Print if the gantry is currently moving.
134+ print(my_gantry.is_moving())
135+
82136 Returns:
83137 bool: Whether the gantry is moving.
84138 """
0 commit comments