This functionality is an extension of the IEC 61131-3 standard.
You declare temporary variables locally between the keywords VAR_TEMP
and END_VAR
.
VAR_TEMP
declarations are possible only in programs and function blocks.
CODESYS initializes temporary variables each time the POU is called.
The application can access the temporary variables only in the implementation part of a program block or a function block.
Example
VAR_TEMP iVarTmp1 : INT; (*1st temporary variable *) END_VAR