Creating Local Variables

You might need to use a local variable when reading from one front panel object to two block diagram locations or when writing to one front panel object from two block diagram locations.

Right-click an existing front panel object or block diagram terminal and select Create»Local Variable from the shortcut menu to create a local variable. A local variable icon for the object appears on the block diagram.

Complete the following steps to create a local variable and associate it with a front panel object.

  1. Select Functions»Structures»Local Variable and place a local variable on the block diagram. The local variable node is not yet associated with a control or indicator.
  2. Right-click the local variable node and select a front panel object from the Select Item shortcut menu. The shortcut menu lists all the front panel objects that have owned labels. You also can use the Operating tool or Labeling tool to click the local variable node and select the front panel object from the shortcut menu.
Note  LabVIEW uses owned labels to associate local variables with front panel objects, so label front panel controls and indicators with descriptive owned labels.