LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate the average from n data numbers using DAQ

Hello, 

 

I need to calculate the average of n number of measurements acquired through DAQ 6002 from the APD photodiode. Could someone help me with this like how do I get the average number from the measured intensity values?

 

I have shared my VI and a screenshot of the logic.

 

I would highly appreciate your help and support. 

 

Regards,

Madhusudan

0 Kudos
Message 1 of 7
(1,593 Views)

Hello

Please use the "Clean_Up Diagram" icon on the top right of the icons in your block diagrams.

Especially in the subvi you use.

 

Calculating the average of any number of measurements can be done by adding them in a shift register and divide by the number of measurements.

 

I cannot see how many measurements you take in one loop but probably you can show the i of the for loop again and use that as a divider.

 

Not sending all subvi's does not help.

 

greetings from the Netherlands
0 Kudos
Message 2 of 7
(1,545 Views)

Not able to access the Latest LV version, Not all users will be using the Latest LV Versions.

 

Its always better to share the VI's in Lower LabVIEW Versions (LV2019/LV2020).

 

I have attached the module for calculating the Running average of the Simulated Data Acquisition, Check whether it will helps you tom solve the problem.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 7
(1,537 Views)

Sorry for that, I have attached the previous version of Labview for your reference. Also, I am attaching all the sub-VIs, Please suggest me on this one. 

 

Thanks for sharing the VI for calculating the running average using DAQ. But, I don't whether I am doing it right, I am unable to get the average of numbers.

 

Looking forward to hearing from you soon.

 

 

0 Kudos
Message 4 of 7
(1,508 Views)

Hello,

 

I tried this but I could not record the average value for 50 measurements. I also worked on the mean vi but somehow the average value is incorrect when compared using Excel done manually. Could you please suggest to me what exactly I need to use here?

 

I have attached a vi and sub vi saved in the previous version for easy access and also a screenshot for reference.

 

I would highly appreciate your help.

 

Thanks,

~M

Screenshot 2024-02-03 214408.png

0 Kudos
Message 5 of 7
(1,449 Views)

How much difference do you see with excel?

Is it less than 0.1 % ? or more?

 

And if you have a measurement file, send it, so we can compare the calculations for you.

 

Furthermore, when looking at your coding I see lots of values that are not used anymore, weird wire bends that make your logic difficult to follow and a still don't see what is happening in your program.

 

That is why I ask for a measurement file, so I can concentrate on the calculation and eventual differences with excel.

greetings from the Netherlands
0 Kudos
Message 6 of 7
(1,428 Views)

Here is the csv file attached for your reference through direct data logging from daq board. 

0 Kudos
Message 7 of 7
(1,368 Views)