Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Conversion Functions (FPGA Module)

LabVIEW FPGA Module 8.2 Help
August 2006

NI Part Number:
371599B-01

»View Product Info

Owning Palette: Numeric Functions

Use the Conversion functions to convert data types. The FPGA Module does not support floating-point conversions.

Note  This palette is specific to FPGA targets and contains a subset of the VIs and functions that are on this palette when you edit a Windows or RT target VI.

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 converting numbers to smaller representations, particularly when converting integers, because the LabVIEW conversion routines do not check for overflow.

Palette ObjectDescription
Boolean Array To NumberConverts a Boolean array to a 32-bit unsigned integer by interpreting the array as the two's complement of the binary representation of an integer, with the first element of the array being the least significant bit.
Boolean To (0,1)Converts a Boolean FALSE or TRUE value to a 16-bit integer with a value of 0 or 1, respectively.
Number To Boolean ArrayConverts an integer to a Boolean array of 8, 16, or 32 elements, depending on the number of bits in the integer. The 0th element of the array corresponds to the least significant bit of the two's complement of the binary representation of the integer.
To Byte IntegerConverts a number to an 8-bit integer in the range -128 to 127.
To Long IntegerConverts a number to a 32-bit integer in the range –(2^ 31) to (2^ 31)–1. This function rounds all floating-point numeric values to the nearest integer.
To Unsigned Byte IntegerConverts a number to an 8-bit unsigned integer in the range 0 to 255.
To Unsigned Long IntegerConverts a number to a 32-bit unsigned integer in the range 0 to (2^32)–1.
To Unsigned Word IntegerConverts a number to a 16-bit unsigned integer in the range 0 to 65,535.
To Word IntegerConverts a number to a 16-bit integer in the range –32,768 to 32,767.


Resources


 

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