LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Statistics express

Hi all,

I do not understand how Aritmetic Mean of Stattistics Express vi does work. How many samples does it use to calculate the mean during a continuous acquisition? I assume it is not possible to change this value but it would be useful to know it.

 

Thank you very much.

 

Sangiox

 


0 Kudos
Message 1 of 11
(3,076 Views)

The Statistics Express VI is just a pretty front end to calling standard LabVIEW VIs or performing basic functions. In this case it's calling the standard Mean VI.

0 Kudos
Message 2 of 11
(3,064 Views)

Thanks for your reply but the question remains? How many sampled does it use to calculate the mean?

 

Thank you.

 

Sangiox

0 Kudos
Message 3 of 11
(3,055 Views)

Did you look at the documentation for the Mean VI? It just takes the mean of all the values. How else would you define mean?

0 Kudos
Message 4 of 11
(3,046 Views)

Ok, I try to explain better what I mean.

 

I have a DAQmx continuous acquisition with a scan rate of 100 kS/s that means every second I have 100k sample. This acquisition is inside a whille loop as usual as well as my arithmetic mean. I assume that during a second I have many loops and in each loop my acquisition get a number of samples on which it can calculate the arithmetic mean.

 

So my question: how many samples LV get inside a while loop with this configuration?

 

In this way I can know how many sample it uses for calculate the arithmetic mean.

 

I hope it's more clear now.

 

Thank you again,

 

Sangioz

0 Kudos
Message 5 of 11
(3,034 Views)

You will have as many samples as you programmed the DAQmx function to return, regardless of scan rate. If that does not answer your question, then please upload your code.

0 Kudos
Message 6 of 11
(3,024 Views)

If I well understand, if you acquire "N samples" at a specific Scan Rate LV gives you that N samples. If you choose "Continuous Acquisition", it is possible to specify the Scar Rate but it will run continuosly untill you stop it.

 

Inside a while loop, at each loop you can not decide how many samples you have ready for data manipulation. Am I wrong?  Can you set it?

0 Kudos
Message 7 of 11
(3,007 Views)

Dont choose Continous Acquisition and you'll have N samples for data manipulation ...

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 11
(2,990 Views)

Brilliant idea, but I need to use "Continuous acquisition"...

0 Kudos
Message 9 of 11
(2,987 Views)

Of course you can set the number of samples to read. That is what the 'number of samples per channel' input is for. Even if you leave it at the default of -1 (return all available samples), what is returned is an array (1D, 2D, etc.) and you can simply use the Array Size function.

0 Kudos
Message 10 of 11
(2,975 Views)