Configuring Global Variables device variables

When defining or editing a Global Variables device, you configure the variables that the device will contain.

  1. From the Device window being used to define or edit a Global variables device, next to Variables, select Configure...
  2. A Variables window similar to the following appears.
    Select Add.

  3. The New Variable window appears.

  4. In the Name box, type a name for the first variable.
  5. Use the Type down-arrow to select the data type of the variable. The standard data types are listed. For this example, INT4 is selected.

  6. The X, Y, and Z values represent the dimensions of the variable.
    For a scalar or simple variable, leave the dimension values blank
    For an array variable:
    • X is the first dimension
    • Y is the second dimension
    • Z is the third dimension
      For example:

      FirstGVar is a three dimensional array of INT4s. Its size is 2 x 2 x 2 (or 8 elements).
  7. Type an optional description for the variable, and then select Add.
    The Variables window re-appears with the parameters you specified for the first variable.

  8. Repeat the steps to configure any additional variables for this Global Variables device.
    For this example, two additional variables, an INT2 and FLOAT4 are configured.
    The following shows the Variables window with three variables that reside in the device.

  9. Select OK to save the variables configuration.
  10. Select Save to save the device definition.
    The Global Variables device is added to the Devices tab.

For triggers to be able to access these variables, you must start the Global Variables device.
When the device is started, you will see the device and its variables in the Variables tab.

Notice that FirstGVar is expanded to show the 8 elements of the array.

These variables can be accessed by triggers just as any physical device variables are. The following shows a partial view of a Trigger with a Set action being assigned the value of 123 to an element of the previously defined FirstGVar array variable.

The next section, Configuring Global Variables device structures, describes how to configure a user defined structure in a Global Variables device.