Global variable lists and parameter lists

Topics:

  1. Global variable lists [+]
  2. Parameter lists [+]
  3. Use attribute 'qualified_only' for GVL [+]

Global Variable Lists

A list of global variables or constants is assigned the name "GVL" or the prefix "GVL_", followed by a description of the GVL in the name.

Examples:

Parameter lists

A list of global parameters is given the name "Param" or the prefix "Param_", which is followed by a description of the parameter list in the name.

Examples:

Use attribute 'qualified_only' for GVL

When defining a global variable list or a parameter list use the attribute {attribute 'qualified_only'}, forcing the use of the GVL namespace when using the variables. By using the namespace (e.g.: GVL_Ctrl.bPaintingActive) the global scope of the variable becomes clear.

Positive sample:

Global variable list "GVL_Ctrl":

{attribute 'qualified_only'}
VAR_GLOBAL
    bPaintingActive  : BOOL;
END_VAR

See also the topic Use attribute 'qualified_only' for GVL in section Programming.