Valid labels
#BEGIN
#SQUARE
#X1
#BEGIN1
Invalid labels
#1Square
#123
A Simple Example Program:
#START Beginning of the Program
PR 10000,20000 Specify relative distances on X and Y axes
BG XY Begin Motion
AM Wait for motion complete
WT 2000 Wait 2 sec
JP #START Jump to label START
EN End of Program
The above program moves X and Y 10000 and 20000 units. After the motion is complete, the motors rest for 2
seconds. The cycle repeats indefinitely until the stop command is issued.
Special Labels
The DMC-40x0 have some special labels, which are used to define input interrupt subroutines, limit switch
subroutines, error handling subroutines, and command error subroutines. See section on 705HA S Ruto-tart outine
#ININT Label for Input Interrupt subroutine
#LIMSWI Label for Limit Switch subroutine
#POSERR Label for excess Position Error subroutine
#MCTIME Label for timeout on Motion Complete trip point
#CMDERR Label for incorrect command subroutine
Commenting Programs
Using the command, NO or Apostrophe (‘)
The DMC-40x0 provides a command, NO, for commenting programs or single apostrophe. This command allows
the user to include up to 78 characters on a single line after the NO command and can be used to include comments
from the programmer as in the following example:
#PATH
‘ 2-D CIRCULAR PATH
VMXY
‘ VECTOR MOTION ON X AND Y
VS 10000
‘ VECTOR SPEED IS 10000
VP -4000,0
‘ BOTTOM LINE
CR 1500,270,-180
‘ HALF CIRCLE MOTION
VP 0,3000
‘ TOP LINE
CR 1500,90,-180
DMC-40x0 User Manual Chapter 7 Application Programming • 132