LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please check my VI !!!...!!!

I need to make a Vi that computes the running average of the temperature data. Please check whether i have set it right.
 
Thanks
Suzane
0 Kudos
Message 1 of 12
(3,299 Views)

No; you're computing the average for each loop only.  What you have to do is to use shift-registers and take into account the readings from previous loops. 

Regards,

-Khalid

0 Kudos
Message 2 of 12
(3,285 Views)
Hi
 
I can't look at your vis, because I still use LV7.0. you could use the vi "Mean PtByPt". So you don't have to use a shift-register, as the previous values are stored in this vi. You can also set the size for the buffer, which could be very helpful if you want to calculate the running average.
 
Hope this helps.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 12
(3,287 Views)

Thanks....Please let me know about this one..

 

Thanks again,

 

0 Kudos
Message 4 of 12
(3,280 Views)
It is still LV7.1 - if you want to save it for LV7.0 browse as follows:
 
menu file >> save with options >> save for previous
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 12
(3,274 Views)
you should be able to see it now.
 
Thanks for any help.
0 Kudos
Message 6 of 12
(3,271 Views)
Hi
 
Obviously you didn't do any changes yet, so I modified your vi.
 
I've built in the "Mean PtByPt" vi and display now both values temperature and running average. If you play with the value sample length (set it before you run the vi), you can see the influence of the buffer-length. Start with a small value (maybe 2) and increase it with each time you start the vi again.
 
Hope this helps.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 12
(3,265 Views)
I can also attach the sample lengths with the number of iterations? can i do that?
 
0 Kudos
Message 8 of 12
(3,259 Views)
What do you exactly mean with "with the number of iterations"? I'd say the buffer should always have the same length during one run.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 9 of 12
(3,254 Views)
I think I found the effect you are looking for.  See attached

Paul
0 Kudos
Message 10 of 12
(3,253 Views)