LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Avearge data comparison

Hi,

 

I am scanning a temperature data at every second and get average values for every 40 data.

I want to compare two consecutive average data and if the difference of these two average valuses are less than 0.2 Celsius, I want to write on a file the last average value and increase temperature otherwise keep scanning the temperaure.

If anyone knows, please let me know.

Thank you.

 

Sincerely,

 

Seongchul Jun

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

So what do you have so far?

 

I am picturing a shfit register to hold your samples to average, another shift register to hold the previous average, and probably a third shift register to keep track of how many samples you have for the current average.  Once your count reaches your average length, perform the average and subtract from the previous average.  Do whatever you are supposed to do based on that result.


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
0 Kudos
Message 2 of 5
(2,883 Views)

Thank you for your time.

I thnk I understand what you mean. But I want to explain it in more detail.

First, I want to campare the averages of 1~40th and 41~80th, then if the these average differences larger than 0.2 C then, I want to compare 2-41st  and 42-81 and so on.

I mean I want to compare average of 40 data  whenever I scan the data.

 

Seongchul

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

Ok, so you need to keep a shift register that holds all of your elements (however large you feel you need to go).


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
0 Kudos
Message 4 of 5
(2,857 Views)

The Mean-ptbypt could be used. Set the sample lenght to 40.

Message 5 of 5
(2,845 Views)