Description
You can use the "Define jump list" instruction to define several conditional jumps and continue the program execution in a specific network depending on the value of the K parameter.
You define the jumps with jump labels (LABEL), which you specify at the outputs of the instruction box. The number of outputs can be expanded in the instruction box. The number of outputs also depends on the firmware version:
-
S7-1200: A minimum of 32 outputs is possible.
-
S7-1500: A minimum of 256 outputs is possible.
The numbering of the outputs begins with the value "0" and is continued in ascending order with each new output. Only jump labels can be specified at the outputs of the instruction. Instructions or operands cannot be specified.
The value of the K parameter specifies the number of the output and thus the jump label where the program execution is to be resumed. If the value in the K parameter is greater than the number of available outputs, the program execution is resumed in the next network of the block.
The "Define jump list" instruction is only executed if the signal state is "1" at the EN enable input.
Parameters
The following table shows the parameters of the "Define jump list" instruction:
|
Parameters |
Declaration |
Data type |
Memory area |
Description |
|---|---|---|---|---|
|
EN |
Input |
BOOL |
I, Q, M, L, D or constant |
Enable input |
|
K |
Input |
UINT |
I, Q, M, L, D or constant |
Specifies the number of the output and thus the jump that is to be made. |
|
DEST0 |
- |
- |
- |
First jump label |
|
DEST1 |
- |
- |
- |
Second jump label |
|
DESTn |
- |
- |
- |
Optional jump labels |
For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
|
Parameters |
Operand/jump label |
Value |
|---|---|---|
|
K |
Tag_Value |
1 |
|
DEST0 |
LABEL0 |
Jump to the network that is identified with the jump label "LABEL0". |
|
DEST1 |
LABEL1 |
Jump to the network that is identified with the jump label "LABEL1". |
|
DEST2 |
LABEL2 |
Jump to the network that is identified with the jump label "LABEL2". |
If the "Tag_Input" operand has signal state "1", the instruction is executed. The execution of the program is continued according to the value of the operand "Tag_Value" in the network that is identified with the jump label "LABEL1".