Galil Motion Control optcom Page 176
Optima DMC-1xxx and DMC-18x2 Command Reference
RI
i
165
RI
FUNCTION: Return from Interrupt Routine
DESCRIPTION:
The RI command is used to end the interrupt subroutine beginning with the label #ININT. An
RI at the end of this routine causes a return to the main program. The RI command also
re-enables input interrupts. If the program sequencer was interrupted while waiting for a
trippoint, such as WT, RI1 restores the trippoint on the return to the program. RI0 clears
the trippoint. To avoid returning to the main program on an interrupt, use the command
ZS to zero the subroutine stack. This turns the jump subroutine into a jump only.
ARGUMENTS: RI n
where
n = 0
Clears the interrupted trippoint
n = 1
Restores state of trippoint
no argument clears the interrupted trippoint
USAGE: DEFAULTS:
While Moving
No
Default Value
-
In a Program
Yes
Default Format
-
Command Line
No
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
#ININT
Input interrupt subroutine
"II (Binary EC)"
Enable input interrupts
EXAMPLES:
#A;II1;JP #A;EN
Program label
#ININT Begin
interrupt
subroutine
MG "INPUT INTERRUPT" Print Message
SB 1
Set output line 1
RI 1
Return to the main program and restore trippoint
Hint: An application program must be executing for the #ININT subroutine to function.