Functions Palette/Programming/Numeric/Conversion

From LabVIEW Wiki
Jump to: navigation, search
Object information
Owning palette(s) Numeric palette
Type Subpalette
Requires Basic Development Environment
Icon Functions - Numeric Palette - Conversion.png

Use the Conversion VIs and functions to convert data types.

When these functions convert a floating-point number to an integer, they round the output to the nearest integer, or the nearest even integer if the fractional part is 0.5. If the result is out of range for the integer, these functions return the minimum or maximum value for the integer type. When these functions convert an integer to a smaller integer, they copy the least-significant bits without checking for overflow. When they convert an integer to a larger integer, they extend the sign of a signed integer and pad an unsigned integer with zeros.

Use caution when you convert numbers to smaller representations, particularly when converting integers, because the LabVIEW conversion routines do not check for overflow.


Functions Palette/Programming/NumericTo Extended Precision FloatTo Double Precision FloatTo Single Precision FloatTo Fixed-PointTo Quad IntegerTo Long IntegerTo Word IntegerTo Byte IntegerTo Unsigned Quad IntegerTo Unsigned Long IntegerTo Unsigned Word IntegerTo Unsigned Byte IntegerTo Extended Precision ComplexTo Double Precision ComplexTo Single Precision ComplexCoerce To TypeNum to ArrayArray to NumBool to (0,1)To Time StampString To Byte ArrayByte Array To StringConvert UnitCast Unit BasesColor to RGBRGB to ColorEnum to Array of Enums
About this image
Conversion palette (Click on a function to navigate, or on the arrow to go to parent palette)

Functions

Icon Name
To Extended Precision Float To Extended Precision Float
To Double Precision Float To Double Precision Float
To Single Precision Float To Single Precision Float
To Fixed-Point To Fixed-Point
To Quad Integer To Quad Integer
To Long Integer To Long Integer
To Word Integer To Word Integer
To Byte Integer To Byte Integer
To Unsigned Quad Integer To Unsigned Quad Integer
To Unsigned Long Integer To Unsigned Long Integer
To Unsigned Word Integer To Unsigned Word Integer
To Unsigned Byte Integer To Unsigned Byte Integer
To Extended Precision Complex To Extended Precision Complex
To Double Precision Complex To Double Precision Complex
To Single Precision Complex To Single Precision Complex
Coerce To Type Coerce To Type
Num to Array Num to Array
Array to Num Array to Num
Bool to (0,1) Bool to (0,1)
To Time Stamp To Time Stamp
String To Byte Array String To Byte Array
Byte Array To String Byte Array To String
Convert Unit Convert Unit
Cast Unit Bases Cast Unit Bases
Color to RGB Color to RGB
RGB to Color RGB to Color
Enum to Array of Enums Enum to Array of Enums

History

Version Change(s)
LabVIEW 2018 More info to come.