LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

record, calculate and save data periodically

Hi,
I am working on a labview project. I have a continuous input data which is updated every 100ms. I need to calculate the 15 minutes average value, one hour average value of this input data and save this average values into excel file continuously. I have problem about how to calculate the 15 minutes average input data value. I have look through some example for parallel while loop, but my main problem is how to calculate the 15 minutes average values periodically and save it to the file. Thanks for your help.
Fred
0 Kudos
Message 1 of 3
(2,572 Views)
You do not need parallel loops to calculate a running average. Just keep two arrays of old data in a shift register inside the same loop. The first array is 9000 points (15 min) and the second is 36000 points (1 hr).

Append new data to the top of the array and delete any excess points from the bottom. Calculate the average on the entire array every time you add a point and write these values to other Excel columns.

Michael Munroe
www.abcdef.biz
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 3
(2,572 Views)
Hi,

Thanks for your help
0 Kudos
Message 3 of 3
(2,572 Views)