This example demonstrates how to de-interleave a 1D array that contains data of multiple channels.
If you are using a DMA FIFO to transfer multiple channels of data from an FPGA VI to a host VI through an interleaving technique, you will invariably need to break that data back into the individual channels in the host VI. Traditionally, the best way to do this is using the Decimate 1D Array function to break it back down into each of the channels followed by the Build Array function which builds the data back into a 2D array. A VI Snippet which illustrates this technique is shown below.
The technique is fine if the number of channels of data you are transferring is fixed. If you need to vary the number of channels you are transferring without modifying the code, you can use a technique which uses the Reshape Array function which is shown in this example. The output will be a 2D array where each row contains values of one channel. If the quotient of Interleaved Data values and Number of Channels is not an integer, remaining values are ignored.
LabVIEW Base Development System 2012 (or compatible)
If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)
No hardware is necessary to use this example VI
Steps to Implement or Execute Code
Download and open the attached file "De Interleaving data of 1D array LV2012 NIVerified.vi"
Follow the instructions in the Front Panel and run the program
Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**