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

Table of Contents

Advertisement

program line where the maximum number of characters on a line is 80 (including semicolons). A
carriage return enters the final command on a program line.

Using Labels in Programs

All DMC-18x2 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
#BEGIN
#SQUARE
#X1
#begin1
Invalid labels
#1Square
#123
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 respectively. 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-18x2 has special labels, which are used to define input interrupt subroutines, limit switch
subroutines, error handling subroutines, and command error subroutines. The following labels listed
below are the automatic subroutines supported by the controller. Sample programs for these
subroutines can be found in "Automatic Subroutines for Monitoring Conditions" on page 124.
#AUTO
#ININT
#LIMSWI
#POSERR
#MCTIME
#CMDERR
#AUTOERR
DMC-18x2
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
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
Starts program on power-up or reset
Label for Input Interrupt subroutine
Label for Limit Switch subroutine
Label for excess Position Error subroutine
Label for timeout on Motion Complete trip point
Label for incorrect command subroutine
Label for checksum error
Chapter 7 Application Programming • 111

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-1812Dmc-1822Dmc-1832Dmc-1842

Table of Contents