LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaging in intervals

Solved!
Go to solution

My main Program operation is to turn on a heater for a specified time (10 s), and put it off for 60 sec. Data between 30s-50s is averaged. This is repeated for a required number of cycles. The top loop tells the heater when to switch on and off ( not included completely), and tells the bottom loop when to start averaging. The bottom loop cannot have a outer while loop, and the random number function cannot be placed inside a new while loop. Currently I get a average of the data after all cycles. Would anyone be able to suggest me in a direction where I could get the average for each individual cycle. 

Download All
0 Kudos
Message 1 of 4
(2,840 Views)

1. You really should turn your top loop into a State Machine.

2. Your FGV would be more efficient as a Global Variable

3. You might want to have a look at the Mean PtByPt.vi for keeping your average.

4. You might also have a look at the Boolean Crossint PtByPt.vi for telling the Mean PtByPt.vi when to reset.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(2,819 Views)

Thanks, using the PtByPt vi's hepled. However, I'm still off my average as the data when the boolean turns off is added as well. Is there any way I could exclude that data point? I have incuded getting the average by using shift registers and can be run for a single cycle for comparison.

Download All
0 Kudos
Message 3 of 4
(2,775 Views)
Solution
Accepted by topic author prithvibasak

See if this helps some...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(2,755 Views)