Page 1 of 1

Unwanted 1 step hysteresis

Posted: Thu May 28, 2020 1:37 pm
by rlkeck10
Using an up-down counter and logic analyzer, I have found that there seems to be 1 step of hysteresis when Kflop is used in step direction mode with no feed back. I.e. if I start with Move0=0, then Move0=1, Kflop may or may not output a step pulse depending on the last direction it was moved. This is true with larger moves as well; it comes up 1 step short depending on the direction of the last move. In the channel setup, I do not see anything that should cause this behavior. I have attached the Channel 0 setup I am using. Is there a problem with the channel setup or is there a problem with Kflop?

Re: Unwanted 1 step hysteresis

Posted: Thu May 28, 2020 4:18 pm
by TomKerekes
Hi rlkeck10,

The KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis. This means that when stepping in one direction the trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite direction. The trajectory must reverse at least 1/8th of a Step. Otherwise there can be a possibility where the axis should be essentially sitting still, and happens to be very close to the boundary between two steps, results in +/- step pulses at a high rate.

Re: Unwanted 1 step hysteresis

Posted: Sat May 30, 2020 12:01 am
by rlkeck10
If I'm using a STEP/DIR driver, it may or may not operate with micro-steps and there may or may not be 8 micro-steps per step, so I'm not sure why you say the hysteresis is 1/8 of a step; it seems to be 1 step. (My example move was 1 [full] step). Depending on the system 1 step could be anywhere from 1 full motor step to 1/256 of a motor step and the resulting motion might be 0.001 inch or 0.0001 inch or something else entirely. So it seems to me it should be possible to set the hysteresis to a user specified value or disable it entirely since depending on the application hysteresis might be highly undesirable.
The justification doesn't seem to makes sense either, at least for a conventional orthogonal axis machine. For any linear move, each axis is either monotonically increasing, decreasing or exactly constant, so there should be no tendency to oscillate. Even for arcs, the axes are increasing or decreasing for a half circle before reversing, so again there should be no tendency to oscillate.

Re: Unwanted 1 step hysteresis

Posted: Sat May 30, 2020 6:35 pm
by TomKerekes
Hi rlkeck10,

KSTEP just works in "Steps" regardless of whether or not the Driver does microstepping or to what level. 1/8th of a KSTEP "Step" will always be 1/8th of the minimum programmable resolution and should not be significant.

Floating point calculations may have errors, although usually very small can sometimes appear similar to noise. I think to assume things are exact or even consistent is a big mistake.


I love this :)

Image

Re: Unwanted 1 step hysteresis

Posted: Sat May 30, 2020 9:47 pm
by rlkeck10
OK, now that I understand that 1/8 step is in fact a fractional step, I'm still at a loss as to why when I do a Move0=0 and then a Move0=1, which is 7/8 of a step more than the 1/8 step of hysteresis, I do not necessarily get a step pulse depending on the direction of the last move, which also was at least 1 full step. Even accepting all the vagaries of floating point, this would seem to be a completely unambiguous move not subject to round off.

Re: Unwanted 1 step hysteresis

Posted: Sun May 31, 2020 3:24 am
by TomKerekes
Hi rlkeck10,

Without hysteresis a movement of up to 1.000 might be required to generate a step pulse. With hysteresis of 0.125 and reversing a movement of up to 1.125 may be required.

HTH