MT UnPack Bits VI

LabView Digital Modulation

MT UnPack Bits VI

Unpacks an array of signed or unsigned integer data. You can specify the packed bit order as MSB First or LSB First. You can also specify the integer format to be Signed or Unsigned.

This array unpacks data of the form an,n = 0…N–1 into an output binary bit stream {b i}, i = 0… MN – 1, where M denotes the number of bits per integer.

Details

MT UnPack Bits

c1di32.gif

input integers specifies the signed or unsigned integer data a n, n=0…N–1 to be converted into binary data. The default is empty.

ci32.gif

bits per integer specifies the number of bits corresponding to the binary representation of every element in the input integers array. If you choose Unsigned for the integer format, the maximum value is 31. If you choose Signed, the maximum value is 32.The default is 1.

cenum.gif

packed bit order specifies the order in which the binary data stream has been packed into integers.

MSB first (0)

Data is packed with the most significant bit (MSB) first. This is the default value.

LSB first (1)

Data is packed with the least significant bit (LSB) first.

cenum.gif

integer format specifies the input integer format.

Unsigned (0)

The entire number is packed as a positive integer. This is the default value.

Signed (1)

The most significant bit (MSB) determines the sign of the input integer.

ccclst.gif

error in (no error) can accept error information wired from previously called VIs. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. Right-click the front panel error in control and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

cbool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred. Right-click the front panel error in control and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

ci32.gif

code identifies the error or warning code. Right-click the front panel error in control and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

cstr.gif

source describes the origin of the error or warning. Right-click the front panel error in control and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

i1di8.gif

output bit stream returns the output binary data stream b i ={0,1}, i=0…MN–1 that corresponds to the packed representation of the input binary data.

icclst.gif

error out passes error or warning information out of a VI to be used by other VIs. Right-click the front panel error out indicator and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred. Right-click the front panel error out indicator and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

ii32.gif

code is the error or warning code. Right-click the front panel error out indicator and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

istr.gif

source describes the origin of the error or warning. Right-click the front panel error out indicator and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

Details

The relationship between the input integers and the output bit stream is given by the following equations:

b i×M+j = (a i»(M–1–j)) &1, j = 0…M–1, i=0…N – 1 (packed bit order set to MSB First)

b i×M+j= (a i»j) &1, j = 0…M – 1, i=0…N – 1 (packed bit order set to LSB First)

Where » denotes the operation of right shifting, and the operator & stands for the logical AND operation. For example, assume the input integers array is the element [4], the bits per integer value is specified as 3, and integer format is set to Unsigned. If packed bit order is set to MSB First, the output bit stream is [1 0 0]. If the packed bit order is set to LSB first, the output bit stream is [0 0 1]. The signed negative numbers are stored as the 2's complement. Thus, if integer format is set to Signed and the bits per integer is set to 3, the input integer array is the element [–3], and the packed bit order is set to MSB First the output bit stream is [1 0 1].