Jumps  JMP  JMPC  JMPNC  JMPCN

Statement - Jump to a label.

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 this example the TON block will not be called if bEnable is TRUE. *)
Jump Fbd

FFLD Language

  • In the FFLD language, the Insert Jump symbol (FFLD Language 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.

Jump FFLD

IL Language

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