Galil Motion Control DMC-21 5 Series User Manual page 115

Table of Contents

Advertisement

Digital Inputs
The general digital inputs for are accessed by using the
function returns the logic level of the specified input, n, where n is a number 1 through 16.
Example - Using Inputs to control program flow
JP
#main,(@IN[1]=0);
JP
#input,(@IN[2]=1);
AI
7;
AI
-6;
Example - Start Motion on Switch
Motor A must turn at 4000 counts/sec when the user flips a panel switch to on. When panel switch is turned to off
position, motor A must stop turning. The switch is tied to Input 1 and the input is active when the switch is turned
on.
#main;
SH
A;
JG
4000;
#speed;
AI
-1;
BG
A;
AI
1;
ST
A;
AM
A;
JP
#speed;
EN;
The Auxiliary Encoder Inputs
The auxiliary encoder inputs can be used for general use. For each axis, the controller has one auxiliary encoder
and each auxiliary encoder consists of two inputs, channel A and channel B. The auxiliary encoder inputs are
mapped to the inputs 81-96.
Each input from the auxiliary encoder is a differential line receiver and can accept voltage levels between ±12
volts. The inputs have been configured to accept TTL level signals. To connect TTL signals, simply connect the signal
to the + input and leave the - input disconnected. For other signal levels, the - input should be connected to a
voltage that is ½ of the full voltage range (for example, connect the - input to 5 volts if the signal is a 0 - 12 volt
logic).
A DMC-2115 has one auxiliary encoder. This encoder has two inputs (channel A and channel B). Channel A input is
mapped to input 81 and Channel B input is mapped to input 82. To use this input for 2 TTL signals, the first signal
will be connected to AA+ and the second to AB+. AA- and AB- will be left unconnected. To access this input, use the
function
and @IN[82].
@IN[81]
NOTE: The auxiliary encoder inputs are not available for any axis that is configured for stepper motor.
Input Interrupt Function
The DMC-21x5 provides an input interrupt function which causes the program to automatically execute the
instructions following the
Chapter 7 Application Programming ▫ 110
'jump to main label if input 1 is active
'jump to input label if input 2 is inactive
'wait until input 7 is inactive
'wait until input 6 is active
'main program label
'enable A axis
'define jog speed
'label for loop
'wait for switch to be on, Input 1 active, @IN[1]=0
'begin motion
'wait for switch to be off, Input 1 inactive,
@IN[1]=1
'stop motion on A axis
'wait for motion to finish
'jump back to speed label to repeat
'end program
label. This function is enabled using the
#ININT
function or the
@IN[n]
TI
command.
II
command. The
@IN[n]
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents