User`s manual
7-18 Motion Mate™ DSM314 for Series 90™-30 PLCs User's Manual
–
January 2001 GFK-1742A
7
Multi-Axis Program Structure
•
PROGRAM definition statement
. It must be the first line of the program. It must
identify the program number and the fact that this is a multi-axis program by using the
MULTI-AXIS term. For example:
PROGRAM 3 MULTI-AXIS
•
Body
. The program body contains the actual program commands. Note that in a multi-axis
program, you must specify an axis number in many of the commands. Failure to do so will
generate an error. Note that the axis number term, such as AXIS1, must not have a space
within it. An example of correct syntax for a multi-axis program command is:
ACCEL AXIS1 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
Multi-Axis Program Example
Note that the term MULTI-AXIS must be used in the PROGRAM statement on the first line, and
that axis numbers are specified in the applicable commands in the program body.
PROGRAM 1 MULTI-AXIS
ACCEL AXIS1 500000
VELOC AXIS1 5000
1: CMOVE AXIS2 –100000, ABS, LINEAR
DWELL AXIS2 6000
JUMP CTL31, 1
CALL P255
LOAD P215, 2000
PMOVE AXIS1 8388607, INCR, S-CURVE
ENDPROG