Local variables are declared between the keywords VAR
and END_VAR
in the declaration part of programming objects. You have read-only access to local
variables (externally via the instance path).
The variable can be extended with an attribute keyword (CONSTANT
, RETAIN
, or PERSISTENT
).
Example
VAR iVar1 : INT; END_VAR