Skip to content

Commit 2297201

Browse files
author
appslab
committed
Added Abort function
1 parent 8d22f57 commit 2297201

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

pylab_ml/pollux/pollux.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,17 +198,16 @@ def status(self):
198198

199199
def calibrate(self):
200200
""" Calibrate each axis of the Pollux controller to determine the origin (lower limit). """
201-
if self.status():
202-
self._write("1 ncal")
203-
self._write("2 ncal")
204-
self._write("3 ncal")
201+
self._write("1 ncal")
202+
self._write("2 ncal")
203+
self._write("3 ncal")
205204

206205
def maximum_limits(self):
207206
""" Determine the maximum limits for each axis of the Pollux controller. """
208207
if self.status():
209208
self._write("1 nrm")
210209
self._write("2 nrm")
211-
210+
212211
def set_limits(self):
213212
"""
214213
Set the maximum limits for each axis of the Pollux controller.
@@ -221,6 +220,12 @@ def set_limits(self):
221220
self._write("0 100 2 setnlimit")
222221
self._write("0 354 3 setnlimit")
223222

223+
def stop(self):
224+
""" Stop any ongoing movement of the Pollux controller. """
225+
self._write("1 nabort")
226+
self._write("2 nabort")
227+
self._write("3 nabort")
228+
224229
@property
225230
def pos_x(self):
226231
""" Get the current position of the X-axis in millimeters. """

0 commit comments

Comments
 (0)