I'm using KMotionCNC 4.30 in closed loop stepper mode with rotary encoders on the shaft of the steppers. I find that the tool position (according to KMotionCNC DRO) will build up an erroneous offset as more movements are performed, yet the switching to encoder view shows the correct position. The problems plays out like this:
1) Press the tool into clay
2) Zero everything, even reinitialize KFLOP to zero all axii and encoders.
3) Set Z-axis to -2 inches
4) Run moderately lengthy program with instructions at start to leave and end to return to the clay
5) Measure offset
When I measure the offset after running the program, I typically find an error that looks as though it's losing counts as it moves (move left and it will offset right a little bit). The KMotionCNC DRO shows X0 Y0 as though it returned to home, but switching to encoder view shows the actual erroneous position X-0.142 Y-0.0179. I moved the tool before I measure Z but I know from experience it's happening there too.
It's running in closed loop, so how can such a large error accumulate? Why doesn't it try to correct such a large error at some point?
KFLOP and GCode attached.