LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

How to average n consecutive blocks of data from balance in labview

We are continuously acquiring data from balance at the rate of 1 data per second which is 60 data per minute. Our requirement is to split those 60 data into successive blocks of 5 datapoints and take average for every 5 datapoints thereby getting 12 blocks of datapoints (60/5) for which average is taken and 1 data point per minute is obtained. This has to be repeated for every minute. Tried various ways using arrays but not working out. Please HELP!

Message 1 of 7
(1,046 Views)

Re: How to average n consecutive blocks of data from balance in labview

What have you tried? Post your code so that we can help to figure out what went wrong.

-------------------------------------------------------
Message 2 of 7
(1,010 Views)

Re: How to average n consecutive blocks of data from balance in labview

one way would be creating a circular buffer, every new data set is sent to the buffer. Once the buffer is full, you can start averaging the data on the buffer according to your specs, this way you don't loose data, and will have an averaged data set at the same time that the data is being acquired.

Every time the buffer is full, you can then start averaging the data, split the data set in chunks of 5 and average them.

Message 3 of 7
(1,005 Views)

Re: How to average n consecutive blocks of data from balance in labview

Message 4 of 7
(978 Views)
Solution
Accepted by topic author Labwizard

Re: How to average n consecutive blocks of data from balance in labview

May all you need is mean ptbypt, then decimate the output.

Message 5 of 7
(972 Views)

Re: How to average n consecutive blocks of data from balance in labview

Will it work if we simply keep two mean blocks one after the other and give sample length 5 for first block and 12 for second block?....will the second block wait till it gets 12 values from first block?

Message 6 of 7
(916 Views)

Re: How to average n consecutive blocks of data from balance in labview

@Labwizard wrote:

Will it work if we simply keep two mean blocks one after the other and give sample length 5 for first block and 12 for second block?....will the second block wait till it gets 12 values from first block?

I don't know which post you are replying to, but what is a "block"? Can you explain what you are talking about?

Functions execute once all inputs have data. Right?

I am not sure why you take the average twice? Taking the average of five 12 times is the same as averaging 60 points directly.

Message 7 of 7
(907 Views)