RETCN

Conditional Return NOT from Function Block

If the content of the accumulator is FALSE, the RETCN command causes the return from a called function block to the main program.

Remarks

  • The value in the accumulator must be of data type BOOL.

  • Operator only available in IL programming language.
  • This command takes no operand.

Example

POU header

In the POU header, all input and output variables are declared that are used for programming this function.

IL body

(* In midst of some function block *)

LD

var_1

(* Load var_1 in accu *)

EQ

var_2

(* var_1 = var_2? *)

RETCN

(* If accu contains FALSE, continue execution with statement,

following the statement that called the function block *)

Modified on: 2019-01-25Feedback on this pagePanasonic hotline