LogixNG Reference - Chapter 12

LogixNG Global Variables

A LogixNG Global Variable is similar to the standard memory variable in that it is accessable from any LogixNG conditional or module. With the exception of an initial value, its content is not retained between PanelPro sessions even if the data file is stored.

Global variables support all of the data types that local variables support, including the complex types such as map and array. It can be used anywhere a local variable can be used. Either a local variable name or a global variable name is used. When a name is supplied, a check is made to see if it matches a local variable. If it does, the local variable is used. If it does not, a check is made to see if it matches a global variable. If it does, the global variable is used. If a match is not found, the "The symbol ... does not exist in the symbol table" error will be displayed. Notice the sequences of checks. If the same name is used for both a local and a global variable, the local variable will be selected.

LogixNG: Set Scale
    ConditionalNG: IQC:AUTO:0004
        ! A
            Set variable Scale to "HO"

In the above example, the name Scale could be either a local or global variable. In this case, it is a global variable since there are no local variables defined in the conditional.

Global variables are created using Tools ⇒ Tables ⇒ LogixNG ⇒ LogixNG Global Variables. See LogixNG Global Variables table for details.

For details on Local Variables see Chapter 8 - Local Variables

Chapter 13 - Jython Scripting Support

Return to the Reference TOC