Jumps JMP JMPC JMPNC JMPCN
Remarks
A jump to a label branches the execution of the program after the specified label.
See Insert Jump for directions on how to add a jump to a label.
-
-
Backward jumps can lead to infinite loops that block the target cycle.
FBD Language
- In the FBD "Function block diagram"
A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks language, a jump is
represented by a signpost containing the label name.
- The input of the signpost must be connected to a valid Boolean signal.
- The jump is performed only if the input is TRUE.
(* In this example the TON block will not be called if bEnable is TRUE. *)
FFLD Language
- In the FFLD language, the Insert Jump symbol (), followed by the target label name, is used as a coil at the end of a rung.
- The jump is performed only if the rung state is TRUE.
- Each rung can begin with a label.
- Labels are used as a destination for jump instructions.
In this example Network #6 is skipped if IN1 is TRUE.
IL Language
- In the IL "Instruction list"
This is a low-level language and resembles assembly language, JMP, JMPC, JMPCN and JMPNC
instructions are used to specify a jump.
- The destination label is the operand of the jump instruction.
These are the meaning of possible jump instructions:
JMP Jump
always
JMPC Jump if the current result is TRUE
JMPNC Jump
if the current result is FALSE
JMPCN Same as JMPNC
(* My comment. *) Start: FFLD IN1
JMPC TheRest (* Jump to "TheRest" if IN1 is TRUE *)
FFLD IN2 (* these three instructions are not executed *)
ST Q2 (* if IN1 is TRUE *)
JMP TheEnd (* unconditional jump to "TheEnd" *)
TheRest: FFLD IN3
ST Q3
TheEnd:
ST Language
Not available.
See Also