Thanks to everyone for their input.  John answered the right question.

The bottom line appears to be that Linuxcnc does "round" both up and 
down to the  "nearest" step as opposed to just dropping the "leftover"


So it already does what I was proposing to do with the MOD operator.
Apparently the actual accumulated error just turned out to be 
coincidentally very close to the amount that would be due to the 
dropping of the fractional part.

So... I will continue to investigate the problem.  By the way, I 
never write code that does not make a setup move before each critical 
move to make sure backlash is cleared without resorting to the 
backlash function in the .ini file.  I have run extensive tests on 
the rotary axis and I am confident that the reduction ratio is 30:1 
dead on so it looks as though I must be actually losing steps 
somewhere between linuxcnc and the axis.

It now occurs to me that the gremlin might actually be in the Z axis 
because steps lost in the Z axis would mimic A axis lost steps due to 
the way my program cuts the teeth.  The Z axis lost steps would 
probably mostly occur on +Z direction since that is the direction 
that requires the stepper to lift the head against gravity as well as 
friction and inertia. I'll try running some tests on Z for lost steps 
and also try slowing things down in Z.... Maybe a counterweight or 
spring to help the stepper  to lift the head.

I will keep you informed.
Thanks again,

Cecil

At 02:07 PM 1/3/2016, John wrote:

>On Sun, Jan 3, 2016, at 01:02 AM, Cecil Thomas wrote:
> > My question is about what happens to the "leftovers" when the
> > precision of the g code commanded position cannot be met by the
> > hardware executing it.
>
>LinuxCNC does not work in steps.  It uses floating point values
>for all internal calculations.  It also uses absolute coordinates, not
>relative ones.
>
>And so it goes all the way around.  No two teeth are 32.72727
>degrees apart, because the physical hardware can't do that.
>But EVERY tooth is within 0.5 degrees of the proper position,
>because LinuxCNC calculates the proper position BEFORE
>rounding it to the nearest step.
>
>Hope this helps clear it up,
>
>John Kasunich
>
>   John Kasunich
>   [email protected]
>
>------------------------------------------------------------------------------
>_______________________________________________
>Emc-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/emc-users
------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to