presents:



- technical hobby stuff -

This page describes a technical thing -
a small computer-numerically controlled
machine that can paint with a pencil on
paper. Like a plotter. But this plotter
is technically more a machine tool than
a plotter, because it is not controlled
by a microcontroller and the motors are
not stepper motors but servo motors. It
does not have two motors which would be
enough for moving the pencil in a plane
but four motors. This is a photo of it:



Watch a nice quicktime-video of it now!

The machine is a numerically controlled
one. That means it is controlled in the
same way as a machine tool like a lathe
or a milling machine. The language this
plotter is programmed with is DIN66025,
also known as "g-code". Three examples:

g01 g90 x1 f100 means: move to position
x=1mm with a feedrate of 100 mm/minute.

g01 g91 y100 f10 means: move 100mm with
feedrate 10 mm/minute into y-direction.

g00 g90 x150 y30 means: move as fast as
possible into position x=150mm, y=30mm.

The four motors of the plotter are used
to move the "gantry" and the "scissor".
The gantry is the bar that is driven by
the two motors "0" in the figure below:



The "scissor" is the parallel mechanism
that moves along the gantry and carries
the pencil. The scissor is moved by two
motors, "1" and "2". The gantry travels
in x while the scissor moves the pencil
in x and y. This is fairly odd, because
it is more than necessary. If a move in
x is needed, it has to be decided if it
should be made by the gantry or if this
move will better be made by the scissor
either alone or partly. We say the tool
(the pencil) is "redundantly actuated".

The purpose of this setup is to combine
the ability of the gantry of travelling
long ways (which the scissor cannot do)
with the ability of the scissor to make
fast short moves (what the gantry is by
far worse at because it is very heavy).

To describe the control of this plotter,
we call the distance the pencil is moved
in the direction x by the scissor "x_s".
"x_g" is the name of the contribution of
the gantry to the motion in direction x.

The solution for distributing the motion
over the two (redundant) "x_g" and "x_s"
is to put the lower frequencies on "x_g"
and the higher frequencies on "x_s". The
same principle is used in 2way speakers.

The next figure shows how the hf-part of
the motion in x-direction is substracted
from the "stream" that leads towards the
gantry and added to the stream that goes
to the scissor. hf means high frequency.



For the meaning of the variables see the
image below. "0","1" and "2" are drives.
"x", "y" and "z" are all 2d-coordinates.



The machine is controlled by a "personal
computer", a pentium 450 mhz with 196 mb
of ram. The computer is running an rt-os
which means "realtime-operating-system".
Basically it is linux (debian) but it is
modified by rtai to make it "real-time".
A system can be called a realtime-system
when it gives the programmer the ability
to determine exactly when everything has
to happen. For example a control loop is
only working properly inside a realtime-
system, because every loop must take the
same time to execute. In a normal system
this is absolutely not the case. This is
a matter of scheduling. Realtime systems
can schedule very powerfully and exactly
on a low level, closely to the hardware.

The application which is controlling the
machine is EMC2. EMC2 has its origins in
the USA, at the NIST (National Institute
of Standards and Technology. Now EMC2 is
at home at linuxcnc.org. The core of EMC
is the motion controller. It has control
over the machine using special i/o-cards
to read the state (limit switches, motor
positions, ...) and change the state (of
the speed of the motors, as an example).

back to main page