Storage location

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Storage location

mapp Services V5.16

Parameter "Storage" determines the location of a variable.

NC_GLOBAL: Variable shared across all interpreter instances, e.g. all axis groups

IP_GLOBAL: Variable shared within the same instance group, e.g. one axis group

LOCAL: Variable shared within the file

Standard

If the storage location is not specified, then it is determined by the scope.

Examples

Variable declared in the VAR file

Its storage and scope is IP_GLOBAL based on the file extension. Loading the VAR file allows every executed program of this interpreter instance to access variable "Speed".

VAR
  Speed : UDINT;
END_VAR

Variable declared in the ST file

Its storage and scope are LOCAL based on the file extension. Only the executed ST program has access to variable "LocalSignal".

VAR
  LocalSignal : BOOL;
END_VAR

Variable declared in the ST file with specified storage location

Its storage is IP_GLOBAL based on parameter "Storage". Its scope is LOCAL based on the file extension.

VAR {IP_GLOBAL}
  GlobalSignal: BOOL;

END_VAR