Re: Single axis homebuilt EMC





garrett beaubien wrote:

> Hello everyone,
>
> I have built a single axis servo system (with later
> plans to add axes), and finally got part of it to
> work.  I took Fred's advice and used the dro.c program
> running as a standard LINUX process.  Thanks Fred.  I
> has no limit or home switches whatsoever, so for those
> dispatcher function, I just stub them out by returning
> a zero, and setting the flags to appropriate values.
> My output stage does not work properly, but I am going
> to look into that.
>
> I have a couple of questions regarding homing.  If I
> unplug my amplifier, I can start up emc, and home my
> axis.  Then it turns green, and by spinning the shaft
> I can see the readout change.  If I plug the amp in,
> and start EMC, as soon as I click home the motor runs
> away.  I wonder if I have the polarity of my amp
> reversed?

This is easy to do.  There are so many polarities here!
There is the polarity of the DAC output to the servo amp,
the velocity command INTO the servo amp, the motor
polarity (both electrical and shaft rotation), the encoder
direction is a kind of polarity, and the DC tach, if there
is one.  I generally tuen the velocity gain all the way down,
so that a large command input just causes it to crawl.
Then you can inspect the signals to see which one needs
to be reversed.

>  When it runs away, it will not home.  Is
> this because it expects homing to accur slower, and
> expects 2 seperate encoder "samples" to be the same?
> My Home Switch dispatcher function always sets the
> flag to "home".

Forget homing!  You don't NEED to home to have closed
loop motion control.  Get the loop to close without runaway, first!
THEN, you can make it home at your leisure.  When you can
push on the motor, see the CNC control send a correction
signal, then take your hand off and see it move back, then you
know all the polarities are correct.

>
> I was also wondering if someone who knows more about
> machine tools than me can explain what I see when I
> first start EMC.  As soon as I start, the Relative
> position is shown as -60.5000.  What does relative
> mean?  Relative to what?  The documentation says this
> is relative to the workpiece.  How is this different
> from absolute (which reads 0.0000).

Before homing, and before establishing an actual offset the
first time the program is run, this offset is pretty much a
random number, probably from something in the calibration
file, which keeps these offsets from run to run.

>  I could
> understand the difference after homing, but I don't
> understand it's meaning before.

Before homing, it really doesn't have any meaning, as you
already know.

>  The Emc seems to
> derive this first value from the initial encoder
> counter value.  Is this true?  If this is the case,
> what good is it?  Also, this value does not seem to
> change after homing.  Should it?

No, I think it is an offset that the USER normally sets.
But, you have never set it.  You can use commands
(in MDI) like G92 X1.05 to set an offset such that,
whatever the absolute position is now, adding the
offset causes the relative coordinate to come out to
1.05 (user units).  This allows you to have offsets
kept in EMC from one run to another of the program
(like on consecutive days).  When you home, the
system should reset the absolute coods, so the relative
coord system is the same as the previous day.

> After I get this thing working, would anyone be
> interested if I posted a schematic and driver?  It is
> pretty simple, probably has about $50 in parts, plus
> $35 for surplus motor.  Should be simple to add axes,
> just copy the same basic circuit.  I could easily add
> some I/O, so that it could have real limit/home
> switches.

If this is just a simple amp that puts a voltage on the motor
proportional to the DAC signal, it is not of much use.
I used such a system when I fist was setting up my machine,
and the performance was abominable.  I had a static error
of about .005", and a following error of about .010" per
IPM of movement!  With a properly tuned velocity servo
amp of my own design, I get a static error of about .00005",
which is the encoder resolution, and a following error of
less than .0001" / IPM, usually about .001" total error
except at the starts and ends of moves.  I use current
sensing of the motor, and an error amp causes motor current
to be proportional to velocity error.  A DC tach senses
instantaneous velocity, with a good linear signal down below
.001 IPM.  This servo only starts to show stick slip
friction below .01 IPM.

It has about $200 in parts/channel, including the circuit board.
It would be hard to do it for much less.

Jon




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

Problems or questions? Contact