DMC-1500
Chapter 7 Application Programming
•
81
Program Format
A DMC-1500 program consists of DMC-1500 instructions combined to solve a machine control
application. Action instructions, such as starting and stopping motion, are combined with Program
Flow instructions to form the complete program. Program Flow instructions evaluate real-time
conditions, such as elapsed time or motion complete, and alter program flow accordingly.
Each DMC-1500 instruction in a program must be separated by a delimiter. Valid delimiters are the
semicolon (;) or carriage return. The semicolon is used to separate multiple instructions on a single
program line where the maximum number of instructions on a line is limited by 38 characters. A
carriage return enters the final command on a program line.
Using Labels in Programs
All DMC-1500 programs must begin with a label and end with an End (EN) statement. Labels start
with the pound (#) sign followed by a maximum of seven characters. The first character must be a
letter; after that, numbers are permitted. Spaces are not permitted.
The maximum number of labels allowed on the DMC-1500 series controller is 254.
Valid Labels
Label
#BEGIN
#SQUARE
#X1
#Begin1
Invalid Labels
Label Problem
#1Square
Can not use number to begin a label
#SQUAREPEG
Can not use more than 7 characters in a label
Program Example:
Instruction Interpretation
#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-1500 has some special labels, which are used to define input interrupt subroutines, limit
switch subroutines, error handling subroutines, and command error subroutines. See section on
”Automatic Subroutines for Monitoring Conditions” on page 95.
Summary of Contents for DMC-1510
Page 6: ......
Page 18: ...6 Chapter 1 Overview DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 88: ...76 Chapter 6 Programming Motion DMC 1500 Figure 6 7 Motion intervals in the Home sequence...
Page 90: ...78 Chapter 6 Programming Motion DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 137: ...DMC 1500 Chapter 7 Application Programming 125 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 157: ...DMC 1500 Chapter 10 Theory of Operation 145 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 160: ...148 Appendices DMC 1500 Card Level Layout...
Page 180: ...168 Appendices DMC 1500...
Page 198: ...186 Appendices DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...