ST Instruction ‘RETURN’¶
Use the RETURN
instruction in order to exit from a function block. You can make this dependent on a condition, for example.
Syntax:
IF b=TRUE THEN
RETURN;
END_IF;
a:=a+1;
If the value of b
is TRUE
, the function block is exited immediately and CODESYS does not execute the instruction a:=a+1;
.