User`s manual
GFK-1742A 7-1
Programmed Motion
A motion program consists of a group of user-programmed motion command statements that are
stored to and executed in the DSM314. The DSM314 executes motion program commands
sequentially in a block-by-block fashion once a program is selected to run. The motion program is
executed autonomously from the PLC, although the PLC starts the DSM314 motion program and
can interface with it (with parameters and certain commands) during execution. In addition,
external inputs (CTL bits) connected directly to the DSM314 faceplate or controlled by Local
Logic can be used in motion programs to delay or alter program execution flow. The PLC
receives status information (such as position, velocity, and Command Block Number) from the
DSM314 during program execution. Motion programs 1-10 and subroutines 1-40 are created
using VersaPro 1.1 (or later) PLC programming software and are stored along with the module’s
configuration settings to the DSM314 via the PLC backplane. Please refer to the
VersaPro
Programming Software User’s Guide,
GFK-1670 or the VersaPro 1.1 on-line help for further
information.
Single-Axis Motion Programs and Subroutines
A single-axis program contains program statements for one axis only. The programmed axis is
specified in the first line of the program, for example: PROGRAM 1 AXIS1. The DSM314 may
operate up to four single-axis programs. These programs may run independently or
simultaneously. For example, motion Program 1 may be written for Axis 1 and motion Program 2
written for Axis 2. Each axis may be home referenced and the motion program for each axis may
execute independently without regard to the state of the other axis. Alternately, Program 1 and
Program 2 may start simultaneously (via the run program %Q bits) during the same PLC sweep.
DSM314 motion programs support the subroutine feature, which may include all the available
motion program commands including the
CALL
command. The
SYNC Block
command is reserved
for multi-axis (Axis 1 and 2) programs and subroutines. Subroutine “nesting” using
CALL
statements is supported to a maximum of 8 levels. Single-axis subroutines, similar to motion
programs, contain commands for only one axis. The difference is that the axis number is not
specified in a single-axis subroutine. A single-axis motion program may
CALL
any single-axis
subroutine stored in module memory. For example, single-axis motion Program 1, operating Axis
1, may include a CALL statement to single-axis Subroutine 1. Additionally, single-axis motion
Program 2, operating Axis 2, may include a CALL statement to single-axis Subroutine 1. Single-
axis motion programs cannot
CALL
multi-axis subroutines.
The motion program and subroutine structure allows flexibility in execution and axis control in
the DSM314 module. The practical limitation is that each axis may only execute one program at
a time. For example, if Program 1 is enabled to run in Axis 1, it must either complete or abort
prior to enabling Program 2 to run in Axis 1.
7
Chapter