User`s manual
Programmed Motion
GFK-1742A Chapter 7 Programmed Motion 7-5
7
Motion Program Basics
Number of Programs, Subroutines, and Statements
The DSM314 supports 10 motion programs, 40 subroutines, and a maximum total of 1000 motion
program statements.
Format
•
Motion programs and subroutines are written using ASCII text.
•
Only one motion language statement is permitted per line, and a motion language statement
may not span more than one line. Normal comments may span multiple lines.
•
White space and blank lines may be used to improve readability and to separate certain items.
•
The Motion Editor is not case sensitive.
•
All motion programs and subroutines must be contained in a single file.
Single-axis and multi-axis programs and subroutines
A given single-axis program must have the capability to be run on any one axis specified in the
Program definition statement. Therefore, motion language commands in single-axis programs
and subroutines will not specify an axis. Rather, the axis specified in the PROGRAM statement is
used for all motion commands in the program. Multi-axis programs and subroutines can only call
multi-axis subroutines. Likewise, single-axis programs and subroutines can only call single-axis
subroutines.
Program and subroutine definition statements
The Motion Editor requires “Program” and ”Subroutine” definition statements that specify
program/subroutine number and axis configuration (PROGRAM 1 AXIS2 or SUBROUTINE 2
MULTI-AXIS). These statements are placed on the first line of the program or subroutine.
Programs are terminated with an ENDPROG statement, subroutines are terminated with and
ENDSUB statement. These statements serves as separators between programs and subroutines,
identify the program and subroutine numbers, and indicate the type of program (single-axis or
multi-axis).
Block numbers and sync blocks
Block numbers will be suffixed with a colon (1: for example). Sync blocks are identified by a line
with a block number followed by the SYNC command (2: SYNC for example). Block numbers
may appear alone on a line or preceding a motion command on the same line.