
User Manual
Chapter 7
GFK-1742F
Jan 2020
Programmed Motion
197
Wait Command
The WAIT command is similar to the DWELL command. Instead of generating no motion for
a specified period of time, a WAIT stops program motion until a specified CTL bit turns ON.
Thus motion stops any time a WAIT is encountered, even if the CTL bit is ON before the WAIT
is reached in the program. The trigger to continue the program can be any of the twelve CTL
bits.
If, in the previous example, WAIT were substituted for DWELL, the motion profile would be
the same except the second PMOVE would not start until the CTL bit turned ON. If the CTL
bit was ON when the program reached the WAIT, the second PMOVE would begin
immediately after the first PMOVE finished.
Also, if WAIT were used instead of DWELL in the previous example, CMOVEs and PMOVEs
would generate similar velocity profiles. The WAIT will stop motion whether the previous
move is a CMOVE or PMOVE.
A single WAIT command only applies to one axis. Therefore, in a multi-axis program, you
must designate an axis number with each WAIT command. For example: WAIT AXIS1
CTL001. If you wish to have both axes wait in a multi-axis program, you must use a separate
WAIT command for each axis.
Subroutines
The DSM314 can store up to ten separate programs and forty subroutines. Subroutines can
be defined as two types: single-axis and multi-axis. Subroutines are available for all motion
programs created with the Motion Editor. Commands within single-axis subroutines do not
contain an axis number; this allows single-axis subroutines to be called from any single-axis
program (the commands in the subroutine use the axis number specified by the calling
program). Commands within multi-axis subroutines contain axis numbers just like
commands within multi-axis programs. Multi-axis subroutines can only be called from
multi-axis programs or subroutines. Single-axis subroutines can only be called from single-
axis programs or subroutines. For example, a single-axis program for axis 1 and a single-axis
program for axis 2 can call the same single-axis subroutine simultaneously. Each subroutine
must be assigned a unique number between 1 and 40.
Subroutines are programmed using the CALL command, which specifies the subroutine
number to be called. When a CALL is encountered during program execution, program
execution is redirected to the subroutine. When the subroutine completes, program
execution resumes at the command after the CALL command. Subroutines can be called
from another subroutine, but once a subroutine has been called, it must complete before it
can be called again for the same axis. Thus, recursion is not allowed.