Conditional Return from Function-Block
If the content of the accumulator is TRUE, the RETC 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? *) |
RETC |
(* If accu contains TRUE, continue execution with statement, following the statement that called the function block *) |