Technical Reference
Motion Programming
8
www.galilmc.com / Galil Motion Control, Inc.
I/O Interface
It is often desirable to synchronize motion with input/output (I/O)
events, which enables the controller to control a complete process.As
such, the DMC can read input signals, both digital and analog, and
can generate digital output signals.Inputs may be control signals
from digital push buttons or analog potentiometers.Outputs can be
used to activate solenoids or valves or to turn on indicator lights.
Input signals, both digital and analog, can be read by the con-
troller and their values can be stored in control variables.These vari-
ables may be used later in motion programs.
The reading of digital inputs may be performed with the instruc-
tion:
DIGITAL = @ IN[2]
which reads the digital input #2 and stores its content, 0 or
1, in the variable DIGITAL.Analog signals are similarly read with the
instruction:
ANALOG = @ AN[3]
which reads analog input #3.
Digital output signals are generated by setting or clearing a bit
with the instructions:
SB 3
CB 3
which sets and clears output bit #3.
The interface with the inputs and the generation of the output
signals allow the controller to perform complete process control
without a host computer intervention.This is illustrated by the fol-
lowing example.
Consider the simple case where the motion of X must be delayed until
the start pulse is given (applied to input 1).When the motion is complet-
ed, an output signal (output 1) must be given for one second.
INSTRUCTION
INTERPRETATION
PR 7000
Distance
SP 5000
Speed
AI 1
Wait for start signal
BGX
Start motion
AMX
Wait for completion
SB 1
Set output 1 high
WT 1000
Wait 1 second
CB 1
Clear output 1
EN
End of program
Example--Start Motion on Input