Polymorphic Units in LabVIEW
Overview
Use units to gain an additional level of consistency checking when you evaluate expressions and formulas, also known as dimensional analysis. With LabVIEW, you do not have to worry about conversions among systems of units because LabVIEW handles unit conversion when it displays data or when you enter data.
The LabVIEW built-in functions, such as Add and Multiply, are polymorphic with respect to units and automatically handle different units. However, to build a subVI with the same polymorphic unit capability, you must use polymorphic units.
You can use polymorphic units for one VI to do the same calculation regardless of the units the inputs receive. For example, if you want to create a VI that computes the root-mean-square value of a waveform, you must define the unit associated with the waveform. A separate VI is necessary for voltage waveforms, current waveforms, temperature waveforms, and so on. However, instead of rewriting the same VI for each case, you can write a single subVI with polymorphic units and call it from the VIs with specific units.
Refer to the LabVIEW Help for the most up-to-date information about polymorphic units in LabVIEW.
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
