![Galil Motion Control DMC-1600 Series User Manual Download Page 159](http://html1.mh-extra.com/html/galil-motion-control/dmc-1600-series/dmc-1600-series_user-manual_3256992159.webp)
parameter o is an interrupt mask. If m and n are unused, o contains a number with the mask. A 1
designates that input to be enabled for an interrupt, where 20 is bit 1, 21 is bit 2 and so on. For
example, II,,5 enables inputs 1 and 3 (20 + 22 = 5).
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
#A Label
#A
II 1
Enable input 1 for interrupt function
JG 30000,-20000
Set speeds on X and Y axes
BG XY
Begin motion on X and Y axes
#B Label
#B
TP XY
Report X and Y axes positions
WT 1000
Wait 1000 milliseconds
JP #B
Jump to #B
EN
End of program
#ININT Interrupt
subroutine
MG "Interrupt has
occurred"
Displays the message
ST XY
Stops motion on X and Y axes
#LOOP;JP
#LOOP,@IN[1]=0
Loop until Interrupt cleared
JG 15000,10000
Specify new speeds
WT 300
Wait 300 milliseconds
BG XY
Begin motion on X and Y axes
RI
Return from Interrupt subroutine
Analog Inputs
The DMC-1600 provides eight analog inputs. The value of these inputs in volts may be read using
the @AN[n] function where n is 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.
Example - Position Follower (Point-to-Point)
Objective - The motor must follow an analog signal. When the analog signal varies by 10V,
motor must move 10000 counts.
Method: Read the analog input and command X to move to that point.
Instruction Interpretation
#Points Label
SP 7000
Speed
DMC-1600
Chapter 7 Application Programming
•
151