From 25fe598fc39d2d10c4a77af6c55f08da8cc2ed2e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 31 Mar 2011 16:41:38 -0400 Subject: [PATCH] Add backlash attribute. --- stepper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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-- -- 2.26.2