Add backlash attribute.
authorW. Trevor King <wking@drexel.edu>
Thu, 31 Mar 2011 20:41:38 +0000 (16:41 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 31 Mar 2011 20:41:38 +0000 (16:41 -0400)
stepper.py

index 10fa94c6df6bf5de0052ca78c8ac048eb3057f03..05325fe7c5ec7a07882044e26f0f5b3894cae6d9 100644 (file)
@@ -61,7 +61,7 @@ class Stepper (object):
                 motor response is slower than the drigital output
                 driver.
     step_size  (float) approximate step size in meters
-
+    backlash   (int) generous estimate of backlash in half-steps
 
     >>> from pycomedi.device import Device
     >>> from pycomedi.channel import DigitalChannel
@@ -132,12 +132,13 @@ class Stepper (object):
     >>> device.close()
     """
     def __init__(self, write, full_step=True, logic=True, delay=1e-5,
-                 step_size=170e-9):
+                 step_size=170e-9, backlash=100):
         self._write = write
         self.full_step = full_step
         self.logic = logic
         self.delay = delay
         self.step_size = step_size
+        self.backlash = backlash
         self.port_values = [1,  # binary ---1  setup for logic == True
                             5,  # binary -1-1
                             4,  # binary -1--