
#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-42x0 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
#AMPERR
Label for Amplifier error routine
#AUTO
Label that will automatically run upon the controller exiting a reset (power-on)
#AUTOERR
Label that will automatically run if there is an EEPROM error out of reset
#CMDERR
Label for incorrect command subroutine
#COMINT
Label for Communications Interrupt (See CC Command)
#ININT
Label for Input Interrupt subroutine (See II Command)
#LIMSWI
Label for Limit Switch subroutine
#MCTIME
Label for timeout on Motion Complete trippoint
#POSERR
Label for excess Position Error subroutine
#TCPERR
Label for errors over a TCP connection (error code 123)
Commenting Programs
Using the command, NO or Apostrophe (‘)
The DMC-42x0 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
‘ HALF CIRCLE MOTION
VE
‘ END VECTOR SEQUENCE
BGS
‘ BEGIN SEQUENCE MOTION
EN
‘ END OF PROGRAM
Chapter 7 Application Programming ▫ 103
DMC-42x0 User Manual
Summary of Contents for DMC-42 0 Series
Page 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...
Page 205: ...CB 50 100 Drawings Appendices 201 DMC 42x0 User Manual...
Page 206: ...Appendices 202 DMC 42x0 User Manual...
Page 207: ...Appendices 203 DMC 42x0 User Manual...
Page 208: ...Appendices 204 DMC 42x0 User Manual...
Page 209: ...Appendices 205 DMC 42x0 User Manual...
Page 210: ...Appendices 206 DMC 42x0 User Manual...
Page 211: ...Appendices 207 DMC 42x0 User Manual...
Page 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...