From: W. Trevor King Date: Thu, 31 Mar 2011 20:41:38 +0000 (-0400) Subject: Add backlash attribute. X-Git-Tag: v0.4~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25fe598fc39d2d10c4a77af6c55f08da8cc2ed2e;p=stepper.git Add backlash attribute. --- diff --git a/stepper.py b/stepper.py index 10fa94c..05325fe 100644 --- a/stepper.py +++ b/stepper.py @@ -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--