M O T I O N C O N T R O L P R O G R A M M I N G
OVERVIEW
Motion Control Programming
101
The DMC motion controller provides a powerful yet easy-
to-use programming language that allows the user to quick-
ly program the controller to handle any motion applica-
tion. Programs can be downloaded into the DMC memory
for execution without host intervention. Multitasking
allows four user programs to be executed simultaneously,
permitting concurrent operation of independent tasks.
Utilizing the DMC to execute sophisticated programs frees
the host computer for other tasks. However, the host com-
puter can still send commands to the controller at any
time, even while a program is being executed.
In addition to standard motion commands, the DMC
provides several commands that allow it to make its own
decisions. These commands include conditional jumps, event
Overview
s motion control technology continues to
advance, applications will be more demanding
than ever. Servo systems are now used for such
diverse tasks as cutting material with a rotating knife,
positioning semiconductor wafers under a microscope,
and synchronizing label applicators with assembly-line
speed. The motion must often be synchronized with
other process events such as firing relays, reading
thumbwheels, or monitoring switches.
The need for ever increasing speed, precision, and
sophistication has resulted in a new generation of intelli-
gent motion controllers, including Galil's DMC-1700,
DMC-1500, DMC-1400, DMC-1300 and DMC-1000
series motion controllers. These controllers provide such
capabilities as coordinated motion, electronic gearing, pro-
gramming memory, symbolic variables, and programma-
ble inputs and outputs for synchronizing external events.
In this section, motion control systems are described
and examples are given of several advanced motion
control problems. In the following examples, the term
DMC refers to a Galil Digital Motion Controller such
as the DMC-1700, DMC-1500, DMC-1300 and DMC-
1000. The DMC-1400 commands also apply, however,
the DMC-1400 does not include analog inputs or coor-
dinated motion.
A
triggers, and subroutines. The DMC also provides automatic
subroutines for detecting and correcting system errors and
handling interrupts from external switches.
For greater programming flexibility, the DMC provides
user-defined variables, arrays, and arithmetic functions.
Command Format
The DMC provides an extensive instruction set for pro-
gramming a variety of motion profiles and applications.
Instructions are represented by two-letter ASCII com-
mands and are English-like for easy programming. For
example, the instruction to begin motion on the X and Y
axes is specified as BG XY.
Instructions are available for specifying motion, program-
ming output lines, checking the status of inputs, and syn-
chronizing motion with events such as elapsed time, motion
complete, or the occurrence of an input. See the Command
Summary for each DMC motion controller on its corre-
sponding page of the catalog for a complete command list-
ing. The following section describes how these commands
are used to develop motion programs. Custom instructions
also can be developed for specialized applications.
Independent Motion Commands
A motion controller can be "told" by a host computer to
perform a move by any of the controlled motors. The
most simple move is one with a trapezoidal velocity pro-
file as illustrated below. This move is completely charac-
terized by the distance, slew velocity, and acceleration and
deceleration rates.
The most basic form of specifying these motion parame-
ters is by "units of position resolution." For example, let the
encoder resolution be 4000 counts per turn and suppose the
objective is to rotate the motor one revolution along a trape-
zoidal velocity, with a total motion time of 0.3 sec with
acceleration and deceleration times of 0.1 sec each. Simple
calculation indicates that the slew velocity equals 5 revolu-
tions per second and that both acceleration and deceleration
rates are 50 revolutions/sec
2
. The motion parameters can be