User`s manual
Programmed Motion
GFK-1742A Chapter 7 Programmed Motion 7-29
7
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.
ACCEL 10000
VELOC 30000
1:
PMOVE 200000, INCR, LINEAR
DWELL 2000
JUMP UNCOND, 1
Figure 7-10. 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).
Conditional Jump testing
ends
when the designated CTL bit turns ON (Jump Trigger occurs) or
when a new Block Number becomes active.
If more than one Conditional Jump is programmed without an intervening PMOVE, CMOVE,
DWELL, or WAIT command, only the last Conditional Jump will be recognized.
v