I have HKT22 optical encoder (3531_0) attached to stepper 3331 which is driving a leadscrew. I am trying to do a reliability test by stepping e.g. 60,000 steps in one direction and then another to test repeatability of positioning.
The positioning repeatability/accuracy as measured by a Vernier is less than 0.1mm (great!). But, when I read the encoder Position value before moving and after stopping the motor I get large error. For example, I get up to 1,000 pulses error on a 60,000 steps move which in my case equates to approximately 8mm error. Note, this error actually does not exist - Vernier shows less than 0.1mm error, this 'error' is just reported by the encoder. I was hoping to use the encoder for closed loop control but with such a large discrepancy between reality and what the encoder reports it appears to be useless for it's purpose.
I have run my software in debug mode so to make sure I know when the encoder readout is taken and that the motors are stationary and the encoder really returns values that are not correct. I also introduced a pause in between moving and reading the encoder for when I am not in the debug mode. The encoder is firmly attached to the shaft too so the disc is not slipping and there is no dust etc on it either.
Is this normal, am I missing something??