Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 70264

Decimate and build 1d array into 2D array

$
0
0

Hi,

 

I am getting AI Data from a FPGA over a DMA FIFO in an interleaved format. So the order of elements would be AI0, AI1, .. , AIn, AI0, AI1, and so on. For my application I need that data to be in the usual daqmx format (channels in rows, multiple samples in columns). So I basically want to replace a daqmx read  with my DMA FIFO read (following the replacement of a PXIe card with 2x NI 9223 modules in a MXI Chassis).

 

I came up with this solution using decimate array and then building these arrays into a 2D array. However there are a lot of buffer allocations and it is not scalable.

The example generates some data for 8 channels and puts 7200 of those in an 1D array (8x AI, 3600 triggers per rev, 2 revs per combustion cycle = 8x 7200 Samples to read).

Array_Decimate_Build.PNG

As no new data is generated I think it should be possible to convert the array without allocating a new buffer, right?

On top, a scalable approach to programmatically set the number of rows (channels) would be really nice.

 

Lukas


Viewing all articles
Browse latest Browse all 70264

Trending Articles