Chapter 7 Application Programming; Overview; Program Format - Galil Motion Control DMC-21 5 Series User Manual

Table of Contents

Advertisement

Chapter 7 Application Programming

Overview

The DMC-21x5 provides a powerful programming language that allows users to customize the controller for their
particular application. Programs can be downloaded into the DMC-21x5 memory freeing the host computer for
other tasks. However, the host computer can send commands to the controller at any time, even while a program
is being executed. Only ASCII commands can be used for application programming.
In addition to standard motion commands, the DMC-21x5 provides commands that allow the DMC-21x5 to make
its own decisions. These commands include conditional jumps, event triggers and subroutines.
For greater programming flexibility, the DMC-21x5 provides user-defined variables, arrays and arithmetic
functions. For example, with a cut-to-length operation, the length can be specified as a variable in a program which
the operator can change as necessary.
The following sections in this chapter discuss all aspects of creating applications programs. The program memory
size is 80 characters x 4000 lines.

Program Format

A DMC-21x5 program consists of DMC 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-21x5 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-21x5 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 in a label.
The maximum number of labels which may be defined is 510.
Valid labels
#begin
#square
#a1
Chapter 7 Application Programming ▫ 78
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents