repetier/Repetier-Firmware — Issue #11: First step is slow
Author: alainm
Created: 2012-03-03 02:03:39+00:00
State: open

Hi, first of all thanks for the nice firmware :)

I have a non-conventional 3d RepStrap which is sensitive to acceleration problems, so I been examining the step pulses with a logic analyzer that I bought just for that :)

The first step is too long, or I could say that the second step is delayed, see this captured image:

I have spent a few hours debugging that without succes, but I have discovered a few things:
1) this happens issuing a simple move comand on Pronterface, 100% repeatable in all situations.
2) with two fast commands they are concatenated as expected and the extra delay does not exist
3) at the end of the movement ther is no extra delay
4) if I increase jerk, the total time increases proportionaly

5) I made a simple modification in repetier.pde line 1501 (d860337)
from:
printer_state.interval = CPUDivU2((int)v);
to:
if (printer_state.stepNumber==0)
printer_state.interval = CPUDivU2((int)v)*3;
else
printer_state.interval = CPUDivU2((int)v);
and the the delay increased by the expected amout. (first delay should have been 0.7ms and is 2ms. with the modifiction it increased by 1.4ms) so it behaves like there is an extra delay somewhere.

This could be an Interrupt routine problem, maybe a lenthy routine happening juster after the first step.

Please, send me any idea that I can test. I will gladly test it.