Using Labels In Programs; Special Labels - Galil Motion Control DMC-1600 Series User Manual

Table of Contents

Advertisement

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-1600 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 80
characters. A carriage return enters the final command on a program line.

Using Labels in Programs

All DMC-1600 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 which may be defined is 254.
Valid labels
Invalid labels
A Simple Example Program:
#START
PR 10000,20000
BG XY
AM
WT 2000
JP #START
EN
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-1600 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
Auto-Start Routine
The DMC-1600 has a special label for automatic program execution. A program which has been
saved into the controller's non-volatile memory can be automatically executed upon power up or
reset by beginning the program with the label #AUTO. The program must be saved into non-
volatile memory using the command BP.
Automatic Subroutines for Monitoring Conditions on page on page 132.
118 • Chapter 7 Application Programming
#BEGIN
#SQUARE
#X1
#BEGIN1
#1Square
#123
Beginning of the Program
Specify relative distances on X and Y axes
Begin Motion
Wait for motion complete
Wait 2 sec
Jump to label START
End of Program
DMC-1600

Advertisement

Table of Contents
loading

Table of Contents