Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Convert Unit Function

LabVIEW 2011 Help

Edition Date: June 2011

Part Number: 371361H-01

»View Product Info
Download Help (Windows Only)

Owning Palette: Conversion VIs and Functions

Requires: Base Package

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.

Details  

x is a floating-point number with or without a unit.
y is a floating-point number that has a unit if x does not have a unit. y does not have a unit if x does have a unit.

Convert Unit Details

Edit the unit string by using the Labeling or Operating tool to highlight the string and entering a new string. You also can right-click the function and select Build Unit String from the shortcut menu to display the Build Unit String dialog box. The unit you enter must be a unit available in LabVIEW.

If the input is a physical number measured in a compatible unit, the output is a pure number measured in the unit specified. For example, if x is 37 meters (m), and you enter m (meters) as the unit in the Convert Unit function, y is 37 with no associated units. If x is 37 meters and you enter ft (feet) as the unit in the Convert Unit function, y is 121.36 with no associated units.

If the input is a pure number, LabVIEW assigns the unit you specify in the Convert Unit function to the number and returns that physical number in the base unit (or a combination of base units) for that class of measurement, as indicated in the following table.

ClassBase UnitAbbreviation
amount of substancemolemol
angle (plane)radianrad
angle (solid)steradiansr
electric currentampereA
lengthmeterm
luminous intensitycandelacd
masskilogramkg
temperature (thermodynamic)kelvinK
timeseconds

For example, if x is 10 and you enter s (seconds) as the unit in the Convert Unit function, y is 10 seconds because seconds is the base unit LabVIEW uses to measure time. If x is 10 and you enter min (minutes) as the unit in the Convert Unit function, y is 600 seconds. You then can change the unit the indicator displays to show minutes, hours, or any other unit of time.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit