Conversion Functions

Use the Conversion functions located on the Functions»Numeric»Conversion palette to convert data types.

Click the icons for function descriptions.

To Byte Integer To Word Integer To Long Integer To Unsigned Byte Integer To Unsigned Word Integer To Unsigned Long Integer To Single Precision Float To Double Precision Float To Extended Precision Float To Single Precision Complex To Double Precision Complex To Extended Precision Complex Number To Boolean Array Boolean Array To Number Boolean To (0,1) String To Byte Array Byte Array To String Convert Unit Cast Unit Bases

Boolean Array To Number To Extended Precision Complex
Boolean To (0,1) To Extended Precision Float
Byte Array To String To Long Integer
Cast Unit Bases To Single Precision Complex
Convert Unit To Single Precision Float
Number To Boolean Array To Unsigned Byte Integer
String To Byte Array To Unsigned Long Integer
To Byte Integer To Unsigned Word Integer
To Double Precision Complex To Word Integer
To Double Precision Float

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. Refer to the Undefined or Unexpected Data section in Chapter 6, Running and Debugging VIs, of the LabVIEW User Manual for more information about overflow.