11-03-2018 02:35 AM
Hi, I'm getting data continuously from meter for interval of 1 second I have to store the data in an array for 10 mins and reset the data after 10 mins.
My aim is to take average, minimum, maximum for 10 mins of voltage. I'm tired using shift registers but i failed on it,suggest me best way to do it.
Thankz in advance
Solved! Go to Solution.
11-05-2018
02:53 PM
- last edited on
01-09-2025
04:06 PM
by
Content Cleaner
This post might get a better response in the general labview forum instead of this one which is specialized on certain hardware configurations and determinism problems.
It might be useful for you to share your code or at least describe how it "failed"
Do you know in advance an "upper bound" for how many points you can get in those 10 minutes? If so, you can store that data in a circular buffer:
http://www.ni.com/tutorial/7188/en/http://www.ni.com/tutorial/7188/en/
None of those statistics (min, max, average) require you to store the array and can be calculated point by point—
11-08-2018 12:15 AM
Thank you so much for your help, it is working perfect on average and maximum case but in minimum, by default the value is set to zero, but in my case voltage value will always greater than zero, so it displays minimum value is zero. I'm struck here, how to set initial value of minimum block as initial voltage of my meter and then starts to comparing the upcoming voltage.
11-08-2018
12:15 PM
- last edited on
05-06-2025
06:12 PM
by
Content Cleaner
FYI, that image is a snippet so you should be able to drag it into your block diagram to see the "true" case. It's supposed to look like this so that the initial value for min, max, and sum are all set to the incoming value:
if for some reason that doesn't work for you, you could always initialize the shift registers to inf and -inf as required
11-09-2018 12:30 AM
Thank you so much for your help sir, I confused lot to set the initial value, but now done with it.
Thank you sir...