Global Variable List

A global variable list (GVL) is used to declare global variables. These are available project-wide.

A GVL can have the following relationship types:

Global Variable List 1:

A global variable list is represented by a two-part rectangle in pale pink and headed with <<global>>. All attributes are shown after the first dividing line:

<attribute name>: <data type>

Properties

“Property”

Description

“Identifier”

Insert or change an unique name of the selected element.

Edit GVL

The following user inputs are available if “Selection” is enabled in the toolbox (default).

User input in the class diagram

Response in the class diagram

Description

Select the tool "Global Variable List (GVL)":

Global Variable List 2:

Click in an empty area of the diagram. The dialog "Add Global Variables List" opens. Enter a name for the new object and close the dialog with "Add".

A GVL is created.

The object exists in the diagram and in the project. The view in the project tree is updated automatically.

Click on a GVL object.

Global Variable List 3:

Command icons are visible to the left above the object.

Click on Global Variable List 4:.

GVL is only removed from the diagram.

Use "flat" removal to remove it from the class diagram view only. The object still exists and is visible in the project tree.

Click on Global Variable List 5:.

GVL is removed from the diagram and the project.

The object is removed. It then no longer exists.

Click on Global Variable List 6:, then on an existing class or a DUT.

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

The declaration of GVL contains the instantiation based on the selected element. Example:

fbExistent : FB_Existent;

Click on Global Variable List 7: and then in an empty area of the diagram.
Dialog “Add POU” opens. Enter a name and exit the dialog with "Add".

A composition points from the GVL to the new class.

The GVL contains the declaration. Example:

fbNew: FB_New;

Click on Global Variable List 8:, then on an existing class or a DUT.

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

The GVL contains the declaration for the selected element. Example:

pExistent: POINTER TO FB_Existent;

Click on Global Variable List 9: and then in an empty area of the diagram.
The dialog “Add POU” opens. Enter a name and exit the dialog with "Add".

An association points from the GVL to the new class.

The GVL contains the declaration for the new class. Example:

pNew: POINTER TO FB_New;

Click on Global Variable List 10:.

 

The attribute or operation list is minimized.

Click on Global Variable List 11:.

 

The attribute or operation list expands.

Click on an identifier. Once it is selected, click again.

After the first click, the name has a blue border. After the second click the line editor opens.

Change the class name in the line editor. The change is applied synchronously to the project. That is, the object name in the project tree and in the declaration section of the POU is adjusted immediately.

Double-click an element.

The corresponding object editor opens, and the declaration and implementation are displayed.

Edit the declaration or implementation. After closing of the object you are returned to class diagram. The changes are automatically applied to the class diagram.

Global Variable List 12:

Keep in mind that the default settings in the dialog 'Add POU' originate from the last application of this dialog.

Sample

Global Variable List 13:

VAR_GLOBAL
    fbMessage      : FB_Message;
END_VAR