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
(3,086 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
(3,065 Views)

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

0 Kudos
Message 3 of 5
(3,059 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
(3,042 Views)

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

0 Kudos
Message 5 of 5
(3,030 Views)