
User Manual
Chapter 7
GFK-1742F
Jan 2020
Programmed Motion
198
Block Numbers and Jumps
Block numbers are used as reference points within a motion program and to control jump
testing. A %AI data word displays the current block number which can be monitored to
ensure correct program execution or to determine when events should occur. A block
number can also serve as a JUMP command destination. Jumps may be unconditional or
conditional. An unconditional jump command simply tells the DSM314 to continue
program execution at the destination block number. A conditional jump only executes if the
specified condition occurs. Examples of both types of jumps follow.
Unconditional Jumps
Example 6: Unconditional Jump
In the example below, the program executes a PMOVE, dwells for 2 seconds, then
unconditionally jumps back to the beginning of the program at block 1. Thus, the PMOVE
repeats until an end of travel limit (High Software EOT or Low Software EOT) or Overtravel
Limit Switch is reached. An Abort All Moves %Q bit command could also be used to halt the
program.
Figure 78: Unconditional Jump
Conditional Jumps
A conditional jump is a JUMP command with a CTL bit specified in the command. Conditional
jumps are Type 1 commands in that they affect program path execution, but they are also
similar to Type 2 commands because they do not take effect until a Type 3 command
following the JUMP command is executed. When a conditional JUMP command is executed,
the DSM314 examines the specified CTL bit. If the bit is ON, program execution jumps to the
destination block number; if the bit is OFF, the program continues executing the command
after the JUMP. Note that the Type 3 command after the conditional jump and at the jump
destination will affect jump behavior.
Conditional Jump commands should not be used with multi-axis programs containing SYNC
blocks unless the JUMP is triggered while both axes are testing the same JUMP command.
Failure to follow this recommendation can result in unpredictable operation.
Conditional Jump testing starts when the next PMOVE, CMOVE, DWELL, or WAIT command
following a Conditional JUMP becomes active.
When Conditional Jump testing is active, the designated CTL bit is tested at the position loop
update rate (0.5, 1.0 or 2.0 milliseconds depending on configuration).