50
•
EN
DMC-1000/1500 Command Reference
DMC-1000
DMC-1500
EN
FUNCTION:
End
DESCRIPTION:
The EN command is used to designate the end of a program or subroutine. If a subroutine
was called by the JS command, the EN command ends the subroutine and returns
program flow to the point just after the JS command.
The EN command is used to end the automatic subroutines #MCTIME, #CMDERR, and
#COMINT. When the EN command is used to terminate the #COMINT communications
interrupt subroutine, there are two arguments; the first determines whether trippoints
will be restored upon completion of the subroutine and the second determines whether
the communication interrupt will be re-enabled.
ARGUMENTS:
EN m, n where
m=0
Return from #COMINT without restoring trippoint
m=1
Return from subroutine and restore trippoint
n=0
Return from #COMINT without restoring interrupt
n=1
Return from communications interrupt #COMINT and restore interrupt
Note1:
The default values for the arguments are 0. For example EN,1 and EN0,1 have the
same effect.
Note2:
Trippoints cause a program to wait for a particular event. The AM command, for
example, waits for motion on all axes to complete. If the #COMINT subroutine is
executed due to a communication interrupt while the program is waiting for a trippoint,
the #COMINT can end by continuing to wait for the trippoint as if nothing happened, or
clear the trippoint and continue executing the program at the command just after the
trippoint. The EN arguments will specify how the #COMINT routine handles trippoints.
Note3:
Use the RE command to return from the interrupt handling subroutines #LIMSWI
and #POSERR. Use the RI command to return from the #ININT subroutine.
USAGE: DEFAULTS:
While Moving
Yes
Default Value
n=0, m=0
In a Program
Yes
Default Format
Command Line
No
Can be Interrogated
No
Used as an Operand
No
RELATED COMMANDS:
RE
Return from error subroutine
RI
Return from interrupt subroutine