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

Table of Contents

Advertisement

A low input on any of the specified inputs will cause automatic execution of the
from Interrupt (RI) command is used to return from this subroutine to the place in the program where the
interrupt had occurred.
NOTE: Use the
RI
command, not EN, to return from the
Example - Input Interrupt
#main;
II
1;
JG
30000,-20000;
SH
AB;
BG
AB;
#loop;
TP
AB;
WT
1000;
JP
#loop;
EN;
#ININT;
MG
"Interrupt
ST
AB;
AM
AB;
#loopInt;
WT
20
JP
#loopInt,(@IN[1]=0);
JG
15000,10000;
WT
300;
BG
AB;
RI;
Jumping back to main program with #ININT
To jump back to the main program using the
then the
command must be issued prior to the
ZS
information.
https://galil.com/download/application-note/note2418.pdf
Analog Inputs
Certain DMC-21x5 accessories provide the controller with eight analog inputs. See the Accessory Components
section for more details. The value of these inputs in volts may be read using the
analog input 1 through 8. The resolution of the Analog-to-Digital conversion is 12 bits (16-bit ADC is available as an
option). Analog inputs are useful for reading special sensors such as temperature, tension or pressure.
The following examples show programs which cause the motor to follow an analog signal. The first example is a
point-to-point move. The second example shows a continuous move.
Chapter 7 Application Programming ▫ 111
'main program label
'enable Input 1 for interrupt function
'set jog speeds on A and B axes
'enable A and B axes
'begin motion
'label for loop
'report A and B axes motor positions
'wait 1000 milliseconds
'jump back to loop label
'end program
'Input Interrupt subroutine
occurred";
'displays the message
'stop motion on A and B axes
'wait for motion to finish
'label for loop
'jump up to loopInt label while input is active
'specify new speeds
'wait 300 milliseconds
'begin motion on A and B axes
'return from Interrupt subroutine
JP
#ININT
subroutine.
command, the
command must be issued in a subroutine and
RI
command. See Application Note # 2418 for more
JP
#ININT
subroutine. The Return
function where n is the
@AN[n]
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents