Local variables

Local variables are placeholders for intermediate results that the system saves in an arbitrary location. They are declared in the POU header of the respective POU.

Local variables can only be used in the accompanying POU body and do not permit an exchange with other POUs. In the POU header a distinction is made between variables which were adopted from the global variable list and those which you declare specially for the current POU header.

Local variables can be declared with different classes. External variables (VAR_EXTERNAL) are references to global variables that are also declared in the local variables list.

NOTE

Extras > Options > Compile options > Address ranges enables you to specify the address area which the compiler reserves for local variables. The remaining address area is used for global variables.

Related topics:

Modified on: 2019-12-10Feedback on this pagePanasonic hotline