Global variables are valid for the entire project. They are, for example, the input and output contacts of a process or they are used for touch terminals and visualization. Global variables are declared in a global variable list under GVLs.
Several global variable lists are allowed in the GVL pool of the project. In user libraries, only one GVL is allowed. You can copy/paste global variables between different lists. If an identifier already exists in a global variable list, _copy1, _copy2... will be appended to the existing identifier. You can delete all global variable lists from the project except for one list, which is mandatory for each project.
The global variable lists can be accessed from the Project pane or from the Variables pane. Empty global variable lists are not displayed in the Variables pane.
Global variables can be declared with different classes. The global variables can be referenced by the POUs via VAR_EXTERNAL (external variables).
The following variables must be declared in the global variable list:Declaring global variables in a library using the global variable list allows you to:
Check and compare variables automatically
Keep data, i.e. names, data types, and user-defined addresses, consistent throughout projects
Track changes made to variables