Constants are terminals on the block diagram that supply fixed data values to the block diagram. Universal constants are constants with fixed values, such as pi () and infinity (). User-defined constants are constants you define and edit before you run a VI.
Complete the following steps to create a user-defined constant.
Right-click an input terminal of a VI or function and select Create»Constant from the shortcut menu. LabVIEW creates a constant of the default data type of the input terminal and highlights the value.
Type the value you want to assign to the constant and press the <Enter> key.
Macintosh and UNIX Press the <Return> key.
You also can press the up and down arrow keys to assign a value to the constant.
LabVIEW resizes the constant to fit its contents. You can resize a string constant the same way you resize a label.
Use the Operating or Labeling tool to click the constant and edit its value. If automatic tool selection is enabled, double-click the constant to switch to the Labeling tool and edit the value.
You also can create a constant in the following ways:
Select a constant on the Functions palette and place it on the block diagram. Most constants are located at the bottom or top of their palettes.
Drag a front panel control to the block diagram. LabVIEW creates a constant that contains the value of the front panel control at the time you dragged it to the block diagram. The front panel control remains on the front panel. Changing the value of the control does not affect the constant value and vice versa.