Creating Polymorphic Units
- Updated2025-08-15
- 1 minute(s) read
Create a polymorphic unit by entering $x in the unit label of a front panel numeric control or indicator, where x is a number, for example $1. You can think of $x as a placeholder for the actual unit. When the VI is called, LabVIEW substitutes the units you pass in for all occurrences of $x in that VI.
If you need to use more than one polymorphic unit, you can use the abbreviations $2, $3, and so on.
Complete the following steps to create a polymorphic unit in a VI.
- Right-click a front panel numeric object and select Visible Items»Unit Label from the shortcut menu.
- Type $x, where x is any number, 1 through 9.
- Click outside the front panel numeric object to end the editing session.