Jump to content

Convert Unit function

From LabVIEW Wiki
Revision as of 12:45, 11 September 2025 by Logmanoriginal (talk | contribs) (Remove stub label and fix some formatting issues)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Object information
Owning palette(s) Conversion palette
Type Function
Requires Basic Development Environment
Icon

The Convert Unit function converts a physical number (a number that has a unit) to a pure number (a number with no units) or a pure number to a physical number. Right-click the function and select Build Unit String from the shortcut menu to build and edit a string of units.

Usage

The Convert Unit function is essential in applications involving physical measurements, such as data acquisition and signal processing. It allows users to strip units from sensor data (e.g., converting a voltage reading in volts to a unitless number for mathematical operations) or add units to computed results for meaningful display (e.g., attaching seconds to a time value). For instance, if input x is 10 and the unit is 's' (seconds), the output y becomes 10 seconds, as seconds is LabVIEW's base unit for time. This ensures compatibility in calculations where units must be handled explicitly.

History

Introduced in early LabVIEW versions, the function has evolved with improvements in unit handling. In LabVIEW 7.x and later, it integrates better with functions like Compound Arithmetic, eliminating the need to manually remove extra units post-operation. Further enhancements include better support for complex unit conversions in LabVIEW 2010 and an improved unit string builder in LabVIEW 2018 for enhanced usability.

Version Change(s)
LabVIEW 2018 Enhanced unit string builder for better usability.
LabVIEW 2010 Improved support for complex unit conversions.
LabVIEW 7.x Integration with Compound Arithmetic to automatically handle extra units.

See Also

External Links