Re: EMC handling backlash



EMC folks,

Regarding backlash, here's how it works in the EMC. A little history: it
*used* to be just in the PID calculations (pidRunCycle() in
emc/src/emcmot/pid.c). The technique was that when the commanded
position delta was positive (moving forward), half the backlash was
added; if the commanded position delta was negative (moving backward),
half the backlash was subtracted; otherwise the axis is still and no
backlash was added or subtracted. The backlash was applied
instantaneously, which is not a problem for servos since the backlash is
typically small and the servo controller will catch up quickly. This
worked fine for PID control, but it didn't apply to steppers.

At the request of the first stepper victim (Tim Goldstein), I moved the
backlash compensation out of the PID calcs and into emcmot.c, in the
spot just before either the PID function or the stepper function were
called. This worked on my stepper test stand, but since the compensation
was instantaneous it stalled Tim's motors. What I did then was blend in
the backlash according to an accel/decel profile. If you look in
emcmot.c for "bac" you'll see just how hideous this is.

I haven't verified that this works correctly for small incremental moves
back and forth that are smaller than the backlash value. That is, what
happens when the motion is reversed before the accel/decel blending of
the backlash has completed? Who knows. If this is a problem, someone
please find out.

Now, if the encoder feedback is on the table directly, after the
coupling between motor and screw, rather than on the encoder, then there
is no backlash that needs to be compensated for. Backlash is only the
difference between motor position sensed by a motor encoder, and actual
table position. At least that's what I thought until I saw Doug
Fortune's posting:

> Maybe once we find a reasonably priced linear encoder (which
> of course directly senses table movement) then it will be
> feasible to have EMC directly characterize the backlash
> along the length of each axis (say every 1/10th, 1/100th or 1/1000")
> and rather than a simple fixed value, the backlash is looked
> up near that location on every reverse of an axis.

and Jon Elson's reply:

> Theoretically doable.

This sounds like standard lead screw compensation, that Jon described.

I'm putting lead screw compensation in the EMC, and I'm curious about
how it's implemented in practice. Some questions:

1. If a CNC has lead screw compensation, does it have backlash
compensation specified separately? Bidirectional LSC can compensate for
backlash at the same time, as Doug described, so backlash compensation
is redundant.

2. How often are the points sampled when building the LSC table? On our
Fanuc axis controller for the Hexapod, the points are 10 millimeters
apart. Ideally there would be several, say 10 or so, around each
rotation of the screw. This works out to every 0.010 inches for a
typical machine. Collecting these points manually for the whole length,
both directions, will take forever. Coupled automatically it can be done
quickly, or at least without being tended.

--Fred



Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact