To download NI software, including the products shown below, visit ni.com/downloads.
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.
Steps to Implement or Execute Code
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.