RETURN  RET  RETC  RETNC  RETCN

Statement - Jump to the end of the program.

Remarks

FBD Language

(* In this example, the TON block will not be called if bIgnore is TRUE. *)

FFLD Language

  • In the FFLD language, the <RETURN> symbol is used as a coil at the end of a rung.
    • The jump is performed only if the rung state is TRUE.

(* In this example all the networks above 5 are skipped if ENABLE is FALSE *)

IL Language

These are the meanings of possible instructions:

  • RET Jump to the end always.
  • RETC Jump to the end if the current result is TRUE.
  • RETNC Jump to the end if the current result is FALSE.
  • RETCN Same as RETNC.
Start: FFLD   IN1
       RETC        (* Jump to the end if IN1 is TRUE *)

       FFLD   IN2   (* these instructions are not executed *)
       ST    Q2    (* if IN1 is TRUE *)
       RET        (* Jump to the end unconditionally *)

       FFLD   IN3   (* these instructions are never executed *)
       ST   Q3

ST Language

IF NOT bEnable THEN
   RETURN;
END_IF;
(* the rest of the program is not executed if bEnable is FALSE *)

See Also