Thanks Paul
I think what you explained is fine for my application; The mechanism consisted in 2 parallel 10bit encoder + two stepper motor, The program work like this, I have these two variables REAL_POSITION “The ABS encoder” and the DEMAND POSITION “where I wont to go”, I have automatic subroutine that calculate the steps and direction, and a toggle bit start the motion and then we have to repeat the calculation 2..3..4…… times until the error is close to 0. I think, I don’t need to use the instruction STI!!, the axis move very slow, to read the encoder, I’m using 2 TTL modules and then I have to convert from Gray code to binary normally in one scan. (Using a controllogix CPU).
Thanks,
Carlos