Chapter 7 Application Programming; Overview; Editor To Enter Programs - Galil Motion Control DMC-18 2 Series User Manual

Table of Contents

Advertisement

Chapter 7 Application Programming

Overview

The DMC-18x2 provides a powerful programming language that allows users to customize the
controller for their particular application. Programs can be downloaded into the DMC-18x2 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-18x2 provides commands that allow the DMC-
18x2 to make its own decisions. These commands include conditional jumps, event triggers, and
subroutines. For example, the command JP#LOOP, n<10 causes a jump to the label #LOOP if the
variable n is less than 10.
For greater programming flexibility, the DMC-18x2 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 1000 lines.
Using the DMC-18x2 Editor to Enter Programs
Application programs for the DMC-18x2 may be created and edited either locally using the DMC-
18x2 editor or remotely using another editor and then downloading the program into the controller.
Galil's Smart Terminal and WSDK-software provide an editor and UPLOAD and DOWNLOAD
utilities.
The DMC-18x2 provides a line Editor for entering and modifying programs. The Edit mode is entered
with the ED instruction. (Note: The ED command can only be given when the controller is in the non-
edit mode, which is signified by a colon prompt).
In the Edit Mode, each program line is automatically numbered sequentially starting with 000. If no
parameter follows the ED command, the editor prompter will default to the last line of the last program
in memory. If desired, the user can edit a specific line number or label by specifying a line number or
label following ED.
*ED
*:ED 5
*:ED #BEGIN
*Note: Another editor wiondow will not be opened in the 3-paned view of the SmartTerminal
program.
DMC-18x2
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Puts Editor at end of last program
Puts Editor at line 5
Puts Editor at label #BEGIN
Chapter 7 Application Programming • 109

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents