Chapter 7 application programming, Overview, Chapter 7 application programming 121 – Galil DMC-2X00 User Manual

Page 131

Advertising
background image

Chapter 7 Application Programming

Overview

The DMC-2x00 provides a powerful programming language that allows users to customize the
controller for their particular application. Programs can be downloaded into the DMC-2x00 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-2x00 provides commands that allow the DMC-
2x00 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-2x00 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 DOS Editor to Enter Programs (DMC-2000
only)

The DMC-2000 has an internal editor which may be used to create and edit programs in the controller's
memory. The internal editor is opened by the command ED. Note that the command ED will not open
the internal editor if issued from Galil's Window based software - in this case, a Windows based editor
will be automatically opened. The Windows based editor provides much more functionality and ease-
of-use, therefore, the internal editor is most useful when using a simple terminal with the controller and
a Windows based editor is not available.

Once the ED command has been given, 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.

NOTE: ED command only accepts a parameter (such as #BEGIN) in DOS Window. For general
purposes, the editing features in this section are not applicable when not in DOS mode.

Instruction Interpretation

DMC-2X00

Chapter 7 Application Programming

y 121

Advertising