WagoMotor discrepancy during quick change
for i in range(20):
blight.move(0)
time.sleep(0.1)
blight.move(10)
do a disprecancy
I correct this problem with this kind of solution :
def start_one(self, motion):
logical_name = motion.axis.config.get("logical_name")
logical_channel = int(motion.axis.config.get("logical_channel"))
####this block####
tolerance = motion.axis.config.get("tolerance", float, 1e-2)
target_rounded = rounder(tolerance, motion.target_pos)
##################
self.wago.controller.devwritephys(
(
self.wago.controller.devname2key(logical_name),
logical_channel,
motion.target_pos,
)
)
####this block####
with gevent.Timeout(0.5, TimeoutError):
while rounder(tolerance, self.wago.get(logical_name)) != target_rounded:
gevent.sleep(0.1)
##################
Edited by Cyril Guilloud