Swap Words Function

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: Data Manipulation Functions

Requires: Base Development System

Swaps the high-order 16 bits and the low-order 16 bits for every long integer in data.

For example, if the input in hexadecimal format is 1234567890ABCDEF, this function swaps 1234 with 5678 and 90AB with CDEF, returning 56781234CDEF90AB. The connector pane displays the default data types for this polymorphic function.

data is an integer, an array of integers, or a cluster containing integers that you want to word swap. In the case of a cluster that contains integers, this function swaps only the integer elements of the cluster. If you want to byte-swap floating-point or fixed-point numbers, use the Type Cast function to cast the value to a 1D array of bytes. Then use the Reverse 1D Array function and type cast it back to a floating-point or fixed-point number. Neither refnums or variants are valid inputs. Both will break the input wire.
word swapped is of the same data type and structure as data.


Not Helpful