From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to repeat a measurement and average out the results

Hello,

 

I'm having trouble with my VI, I'm trying to place a for loop that does 10 measurements of the input voltage and lists out the average max minimum and mean on graph 2 (obtaining results from graph 1) and depending on the mean result the LED's light up, Yellow (Moderate noise), Red (Fail or too much noise). I'm stuck and not sure how to go about this, would someone be able to guide me? Thank you

0 Kudos
Message 1 of 5
(2,612 Views)

First of all, replace the while-loop with a for-loop with the "10" wired to it.

 

Then, I think you can detect noise level simplier using primitives instead of the Express VIs

 

detect noise level.png

0 Kudos
Message 2 of 5
(2,591 Views)

thanks for your reply, I'm having trouble understanding your diagram. Can you please elaborate more? 🙂

0 Kudos
Message 3 of 5
(2,585 Views)

Your "data" containes multiple channels. You surely do not want to average all the channels at once, do you? So, select a channel you want to check for noise. Build a mean of the values and find the min and max values. Build limits for your noise: average*3 and average/3. Check whether these limits are within the min and max range and display the output.

Message 4 of 5
(2,568 Views)

What is that first block that you put? An array subset?

0 Kudos
Message 5 of 5
(2,556 Views)