Input Interrupt Function - Galil Motion Control DMC-14 5 Series Manual

Table of Contents

Advertisement

AI 1;BGX
AI -1;STX
AMX;JP #S
EN;

Input Interrupt Function

The DMC-14XX provides an input interrupt function which causes the program to automatically
execute the instructions following the #ININT label. This function is enabled using the II m,n,o,p
command. The m specifies the beginning input and n specifies the final input in the range. The
parameter o is an integer that represents a binary range of inputs. For example if inputs 1 and 3 want
to be used for the input interrupt function then the corresponding value of o is 2
parameter p is similar to o except the inputs that are specified will activate the input interrupt routine
when they go high instead of low. See the II command DMC-1400 Series command reference for
details.
A low input on any of the specified inputs will cause automatic execution of the #ININT subroutine.
The Return from Interrupt (RI) command is used to return from this subroutine to the place in the
program where the interrupt had occurred. If it is desired to return to somewhere else in the program
after the execution of the #ININT subroutine, the Zero Stack (ZS) command is used followed by
unconditional jump statements.
IMPORTANT: Use the RI instruction (not EN) to return from the #ININT subroutine.
Examples - Input Interrupt
Instruction
#A
II 1
JG 30000,-20000
BG XY
#B
TP XY
WT 1000
JP #B
EN
#ININT
MG "Interrupt has occurred" Displays the message
ST XY
#LOOP;JP
#LOOP,@IN[1]=0
JG 15000,10000
WT 300
BG XY
RI
DMC-14x5/6
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Begin after input 1 goes high
Stop after input 1 goes low
After motion, repeat
Interpretation
Label #A
Enable input 1 for interrupt function
Set speeds on X and Y axes
Begin motion on X and Y axes
Label #B
Report X and Y axes positions
Wait 1000 milliseconds
Jump to #B
End of program
Interrupt subroutine
Stops motion on X and Y axes
Loop until Interrupt cleared
Specify new speeds
Wait 300 milliseconds
Begin motion on X and Y axes
Return from Interrupt subroutine
0
2
+2
or 5. The
Chapter 7 Application Programming
125
i

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-14 6 seriesDmc-1415Dmc-1416Dmc-1425

Table of Contents