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.
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. |
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.
Class | Base Unit | Abbreviation |
---|---|---|
amount of substance | mole | mol |
angle (plane) | radian | rad |
angle (solid) | steradian | sr |
electric current | ampere | A |
length | meter | m |
luminous intensity | candela | cd |
mass | kilogram | kg |
temperature (thermodynamic) | kelvin | K |
time | second | s |
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.