Skip to main content

Element: Global Variable List

_uml_img_gvl_selected.png
Table 2. Display

(1)

Command icons

Tip

The command icons are visible only when the element is selected

(2)

. Header
  • Identification of the element

    • <<global>>

      Variable list which is declared in the project

    • <<library>>

      GVL from a library

    • <<missing>>

      GVL from a library which is not integrated in the project

  • Name of the global variable list

(3)

Variable list

<variable name> : <data type> {'{property}'}



Properties

Identifier

Unique name for the element. You can also change the name in the class diagram by selecting the name and clicking again to open the line editor.

User input

Action

Result

Click the _uml_icon_delete_shallow.png command icon.

The GVL is deleted from the class diagram only. The object remains in the project.

Tip

Hint: After being deleted, the GVL is displayed in the ToolBox view in Incoming cross references or Outgoing cross references. The requirement for this is that you select an element in the class diagram that has a relationship to the deleted GVL.

Click the _uml_icon_delete_deep.png command icon.

The GVL is removed from the diagram and from the project. The object is removed and does not exist anymore.

  1. Click the _uml_icon_composition.png command icon of the GVL.

  2. Click an existing class or DUT.

    The Variable Declaration dialog opens.

  3. Specify a name for the new variable.

    g_New

  4. Click the Add button to end the dialog.

A composition points from the GVL to the selected class or the DUT data type.

The GVL has been extended by the declaration of a function block instance of the selected class or selected DUT.

GVL object:

{attribute 'qualified_only'}
VAR_GLOBAL	
    g_NewClass : SelctedClass;
    g_NewDUT : SelectedDUT;
END_VAR
  1. Click the _uml_icon_composition.png command icon.

  2. Click a blank area in the diagram.

    The Add POU dialog opens.

  3. Specify a name for the new POU.

  4. Click the Add button to end the dialog.

A composition points to the new class from the GVL.

The GVL contains the declaration VarClass_new : class_new;.

  1. Click the _uml_icon_association.png command icon.

  2. Click an existing class or DUT.

    The Variable Declaration dialog opens.

  3. Specify a name for the new variable.

  4. Click the Add button to end the dialog.

An association points to the selected class or DUT from the GVL.

The GVL contains the declaration to the selected element.

Example: ptrObject_1 : POINTER TO Class_2;

  1. Click the _uml_icon_association.png command icon.

  2. Click a blank area in the diagram.

    The Add POU dialog opens.

  3. Specify a name for the new POU.

  4. Click the Add button to end the dialog.

An association points to the new class from the GVL.

The GVL contains the declaration to the new class. Example: ptrClass_2 : POINTER TO Class_new;.

Click the GVL name two times.

The name is outlined in blue after the first click. After you click the second time, an input field opens for changing the name.

The object name in the device tree or POUs view and the name in the declaration part of the GVL are adapted automatically.

Double-click an element.

The corresponding object editor opens.