Galil Motion Control optcom Page 174
Optima DMC-1xxx and DMC-18x2 Command Reference
RE
i
163
RE
FUNCTION: Return from Error Routine
DESCRIPTION:
The RE command is used to end a position error handling subroutine or limit switch handling
subroutine. The error handling subroutine begins with the #POSERR label. The limit
switch handling subroutine begins with the #LIMSWI. An RE at the end of these
routines causes a return to the main program. Care should be taken to be sure the error or
limit switch conditions no longer occur to avoid re-entering the subroutines. If the
program sequencer was waiting for a trippoint to occur, prior to the error interrupt, the
trippoint condition is preserved on the return to the program if RE1 is used. RE0 clears
the trippoint. To avoid returning to the main program on an interrupt, use the ZS
command to zero the subroutine stack.
ARGUMENTS: RE 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:
#POSERR Error
Subroutine
#LIMSWI Limit
Subroutine
EXAMPLES:
#A;JP #A;EN
Label for main program
#POSERR
Begin Error Handling Subroutine
MG "ERROR"
Print message
SB1
Set output bit 1
RE
Return to main program and clear trippoint
Hint: An application program must be executing for the #LIMSWI and #POSERR subroutines to
function.