Attribute 'qualified_only'
The pragma has the effect that variables from a global variable list can only be addressed by specifying the global variable list name (e.g. GVL.nVar). This also applies to variables of type enumeration, which can only be accessed by specifying enumeration name (e.g. E_Sample.eMember). This can be useful for avoiding confusion with local variables.
Please note that a GVL can only be assigned the attribute as a whole. Individual variable ranges of a GVL cannot be declared with the attribute.
Syntax: {attribute 'qualified_only'}
Insertion location: Line above the first VAR_GLOBAL in a GVL
Sample:
Global variable list (GVL):
{attribute 'qualified_only'}
VAR_GLOBAL
nVar : INT;
END_VAR
Within a POU, for example MAIN, the global variable nVar can only be addressed using the prefix GVL:
GVL.nVar := 5;
The following incomplete call of the variables would generate an error:
nVar := 5;