The Global HMI Variable bank can contain any type of HMI variable. When you open a VisiLogic project, the bank is empty. You enter variables in the bank by first creating a variable, such as a List of Images variable, and then adding it to the bank. Once a variable is in the bank, you can refer to it from any HMI Display; although you can change the linked operand, the rest of the parameters remain the same.
Variables take up space in the controller's Flash memory. In some applications, you may copy and paste a variable to a number of Displays, changing operand links where required. In these applications, you can save a great deal of space--and download time--by using a Global Variable, and referring to it as required. No matter how many times you refer to a Global Variable, it is a single variable.
Either create a new variable and then right-click on it,
or
right-click on an existing variable,
then select Set As Global Variable.

Enter a name for the Global Variable, then click OK.

The variable is now part of the Global Variable bank; in the Display, the variable now appears with an arrow, indicating that it is actually a reference to a Global Variable.

Once the variable is in the bank, you can refer to it from any HMI Display.
To insert a Global Variable
Click on Insert Global Variable, then click on the display and drag the cursor; the Get Global Variable box opens.
Select a variable, then click Link to open the Select Operand and Address box and link an operand to the variable; the operand address appears in the Link field

Click OK, then the variable now appears with an arrow, indicating that it is actually a reference to a Global Variable.
To link an existing variable to a global variable.
Right-click the variable and select Get Global Variable; the Get Global Variable box opens.
Select a variable, then click Link to open the Select Operand and Address box and link an operand to the variable; the operand address appears in the Link field

Click OK, then the variable now appears with an arrow, indicating that it is actually a reference to a Global Variable.

|
Note ♦ |
A Global variable cannot be resized. |
|
♦ |
Deleting the last link to a Global Variable also deletes the Global Variable. |