EasyManua.ls Logo

Galil Motion Control DMC-4123 - Input Interrupt Function

Galil Motion Control DMC-4123
237 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
will be connected to AA+ and the second to AB+. AA- and AB- will be left unconnected. To access this input, use
the function @IN[81] and @IN[82].
NOTE: The auxiliary encoder inputs are not available for any axis that is configured for stepper motor.
Input Interrupt Function
The DMC-41x3 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 command. The m specifies the
beginning input and n specifies the final input in the range. The parameter o is an interrupt mask. If m and n are
unused, o contains a number with the mask. For example, II,,5 enables inputs 1 and 3.
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.
Important: Use the RI command (not EN) to return from the #ININT subroutine.
Example - Input Interrupt
Instruction Interpretation
#A
Label #A
II 1
Enable input 1 for interrupt function
JG 30000,-20000
Set speeds on A and B axes
BG AB
Begin motion on A and B axes
#B
Label #B
TP AB
Report A and B 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 AB
Stops motion on A and B axes
#LOOP;JP #LOOP,@IN[1]=0
Loop until Interrupt cleared
JG 15000,10000
Specify new speeds
WT 300
Wait 300 milliseconds
BG AB
Begin motion on A and B axes
RI
Return from Interrupt subroutine
Jumping back to main program with #ININT
To jump back to the main program using the JP command, the RI command must be issued in a subroutine and
then the ZS command must be issued prior to the JP command. See Application Note # 2418 for more information.
http://galil.com/download/application-note/note2418.pdf
Analog Inputs
The DMC-41x3 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.
Chapter 7 Application Programming ▫ 137 DMC-41x3 User Manual

Table of Contents

Related product manuals