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.
The value in the accumulator must be of data type BOOL.
In the POU header, all input and output variables are declared that are used for programming this function.
(* 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 *) |