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

Swap Bytes

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Swaps the high-order 8 bits and the low-order 8 bits for every word in data.

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 by wiring an array of numeric controls to the type input and the floating-point or fixed-point numbers to the x input. Then use the Reverse 1D Array function to convert the array to a floating-point number with the elements reversed. 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 byte swap. If data is a cluster that contains integers, this function swaps only the integer elements of the cluster. Neither refnums or variants are valid inputs. Both will break the input wire.
byte swapped is of the same data type and structure as data.

Resources


 

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