User`s manual

Programmed Motion
GFK-1742A Chapter 7 Programmed Motion 7-17
7
Program and Subroutine Structure
Single-axis Program Structure
PROGRAM definition statement
. It must be the first line of the program. It must
identify the program number and axis number. The program number has a space between
the PROGRAM keyword and the number. In contrast, the axis number must not have a
space within it. For example:
PROGRAM 1 AXIS3
Body
. The program body contains the actual program commands. Note that in a single-
axis program, you must not specify an axis number in any of the commands. Doing so will
generate an error. An example of correct syntax for a single-axis program is:
ACCEL 50000
End of Program
. Uses the ENDPROG statement. This statement clearly identifies the end
of the program and helps separate one program or subroutine from another. The
ENDPROG should be the only thing on the last line of any program:
ENDPROG
Single-Axis Program Example
Note that the axis number is specified in the first line and is not specified in the program body.
Note also, that there is no space in the term AXIS1.
PROGRAM 2 AXIS1
ACCEL 50000
VELOC 5000
PMOVE 10000, ABS, LINEAR
DWELL 6000
PMOVE 5000, ABS, LINEAR
ENDPROG