Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

AI read (beffered) - Extract multi-channel sub-array - moving average

Hi
I have built an RMS voltage filter and tested it on a sine wave input.
I also have a working multichannel continously displayed and write to disk buffered DAQ.
I want to merge these 2 and am having trouble with getting the required data from a buffered Analog Input Read array.
Help!?

This is what I have understood:
The AI Read seems to build a 2 dimensional array, with channels as rows (say 2 channels/rows) and buffer length (say 50) as columns. But then the next read gets concatenated as additional 2 rows under the 1st 2 rows!! Weird and impossible to extract moving buffer?

Yours hopefully
I am not the Rock


Download All
0 Kudos
Message 1 of 2
(2,826 Views)

HI RockInnovations,

The 2d array returned by AI Read is actually organized the opposite way. Each column represents a channel and the rows are the data samples. This information can be found In the LabVIEW Help’s documentation of the AI Read VI. Below is the AI Read Help description of the 2-d scaled array:

                scaled data is a 2D array that contains analog input data in scaled data units. The data appears in columns, where each column contains the data for a single channel. The second (bottom) dimension selects which channel column. The first (top) dimension selects a single data point for that channel. The array must be transposed before graphing.

This probably explains the weird behavior you were seeing in your program. Let me know if you have any questions and take care.

Thanks,
Nathan
NI Chief Hardware Engineer
0 Kudos
Message 2 of 2
(2,811 Views)