You can use global variables in LabVIEW to access and pass data among several VIs that run simultaneously. A global variable comprises a block diagram object and a corresponding global VI, where you define the data that the variable includes.

Global variables are built-in LabVIEW objects. When you create a global variable, LabVIEW automatically creates a special global VI, which has a front panel but no block diagram. Global VIs are unique to global variables. However, like standard VIs, a global VI has the .vi file extension.

To define the data types that a global variable contains, you add controls and indicators to the front panel of the global VI. In effect, this front panel is a container from which several VIs can access data. When you save a global VI to your file system, you can access the global VI to implement the global variable in other VIs that you create.

For example, suppose you have two VIs running simultaneously. Each VI contains a While Loop and writes data points to a waveform chart. The first VI contains a Boolean control to terminate both VIs. If you want to terminate both loops with a single Boolean control, you must use a global variable. If both loops were on a single block diagram within the same VI, you could use a local variable to terminate the loops.