I have just read your last posting again and I have found that in fact
you are running in closed loop stepper mode (looks like I was a bit too
much in a hurry when I wrote my last post).
So this seems to confirm my assumption. I'm pretty sure that the reason
for your problem is the one that I have describe in my last post. To
confirm this please configure your axis as open loop stepper and run a
test. I'm almost 100% sure that with this configuration you won't
see the problem anymore.
Please make sure that you have set the right parameters for steps/rev
(motor) and counts/rev (encoder). If your encoder specifies lines/rev
you will have to multiply this value by 4 to get the counts/rev. For
the correct steps/rev value you will need to multiply the physical
motor steps/rev value with the microstepping factor of your drive (e.
g. a motor with 200 full steps/rev and a drive with 10x microstepping
will result in 2000 steps/rev effective resolution). If there is a gear
between the encoder and your motor you will also have to take care of
the gearing factor.
Best regards,
Jochen