LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ mean value

Hello,

I´m doing a research project in undergraduation and I´m starting to use labview to do it. I´m getting data from DAQ assistent and I need to made a mean with this data. I try to search here, in forum, but I´m not able to solve my problem. In this case (see image below), I´m working with 1000 samples, 5 number os means, and 3 number os points (the bigger for loop). My result in "Write to measurement file" is 15 rows (5 by 5 similar) with 1000 numbers in each and my result in "Write to measurement file2" is 3 rows (expected) but just with 1 number in each. I need to get 3 rows with 1000 numbers in each (after made arithmetic mean with the 5 ones).

I know that is a newbie doubt, but I have already tried a lot of suggestion, without sucess.

Sorry my bad english, I´m brazilian.

 

Gratz

yves

0 Kudos
Message 1 of 4
(2,445 Views)

with what i understand, you want the mean of 1000 points that you are acquiring inside the for loop, which runs for 5 iterations, and you want 5 mean values for 5 iterations. To do that, all you have to do is, take the 'mean.vi' inside the same for loop where you are doing acquisition. Take the mean everytime the acquisition loop runs, connect output of mean vi to write to a 'measurement file 2' which will write i d array of 5 mean values. 

  For other things that you are asking for , you need to post your existing code for us to be able to understand what exactly you are trying.

 

-Nilesh



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
0 Kudos
Message 2 of 4
(2,416 Views)

Hello Nilesh

I don´t understand exactly what this existing code means, sorry.

Actually, I don´t need the mean of 1000 points, but the mean of 5 points for each 1000 points in each big loop (out of flat sequence). I post a image with I get. I need the mean of the 5 values in each row for all the 1000 coluns.

 

Regards

Yves

0 Kudos
Message 3 of 4
(2,393 Views)

You need to post your VI so we can see how you have your DAQ assistant set up as well as the express VI that converts the data from the blue wire to an array.  (That thing could be throwing away data.)

 

Assuming you are collecting 1 channel of data, getting 1000 samples, and repeating the loop 5 times, (in which case I don't understand why you are trying to average across the rows, what does sample 1 of one iteration have to do with sample 1 of the other iterations, .....) you may need to take the mean inside of a for loop on the 2-D array coming out of the for loop you have.  You can take the average of 1-D arrays.

0 Kudos
Message 4 of 4
(2,388 Views)