I am doing a test that requires my motor to move to 3 positions multiple times during the test. It is a stepper motor running closed loop with an encoder. When I use read_pos to verify the movement, it reports that I hit the same location every time. However, read_encoder returns different values each time. The resolution of the stepper is 51200 steps/rev and the encoder is 10000 counts/rev. Why does the encoder report different positions without the step postion being different? Thanks
Are you using microstepping to get the 51200 steps.rev? NI would recommend that the encoder counts be greater than the steeps to get acerate positioning. Now to do some testing with your situation, In Measurement and Automation Explorer (MAX), select the 1-D interactive and do open loop stepper moves and see if the encoder keeps up. If it does please reply back.
How much difference is there when reading the encoder counts? If it is just a few counts (or just one count) I would agree that this is due to a microstepping problem.
Unfortunately not all microsteps are created equal. I.e., if you tell the motor driver just to advance one microstep, and then advance one more, the actual displacmenet may be somewhat different for each microstep (but the motor will reach exactly the same position if the number of microsteps equals one full step). So if the 7344 detects a (minor) following error it will issue a calculated number of microsteps to correct this following error - but probably will not reach the desired position exactly since the calculation assumes that each microstep pulse will cause the same dr ive displacement.
Also, I have heard of problems when the ratio encoder counts to steps per rev. is NOT an even number, rounding errors may occur.
There is an excellent on-line essay about stepping motors, including possible microstepping problems, by a certain Mr Jones. Just do google search for 'jones on stepping motors'.