eeip.py
eeip.py copied to clipboard
Can not update output data o->t
Hello, Thanks for your great library. i'm working on project of motor controlling. I can read data from controller but not update output byte[1]. here's a part of code :
# Switch the motor ON
if (motor_off 1 and home_off: #conditions to switch on the step motor eeipclient.o_t_iodata[1]= 2 # action to switch the motor ON and it's done #time.sleep(4) else: eeipclient.o_t_iodata[1]= 2
# Homing
if motor_on and home_off:
eeipclient.o_t_iodata[1]= eeipclient.o_t_iodata[1] +16 #Action of motor homing
print(eeipclient.o_t_iodata[1]) # this data display 18 but the motor is not doing homing
else: eeipclient.o_t_iodata[1]= 2
I tried to add time sleep but it doesn't work.
Any suggestions to resolve this issue please.
Thank you in advance! Alexis