09-18-2012 01:25 PM
Hello all,
I am taking continous measurement and I wanted to average the last 10000 readings and stop the loop if the stanard deviation is less then 0.2. I couldnt configure how to delete the earlier data than the last 10000 measurements.
Thanks
09-18-2012 01:28 PM
Look in the Signal Processing->Point by Point->Probability and Statistics PtbyPt palette. There is a mean and a standard deviation in there. It will do it all for you.
09-18-2012 01:30 PM
Thanks but I am avare of that VI. My question is more like how can I delete the previous values from the array so I will always have 10000 readings ?
09-18-2012 01:53 PM
I'm afraid I may also be misinterpreting the question, but the image below shows 3 different methods for getting a select 10,000 datapoints from an array. If this doesn't help, please post your vi or a sample of the code in question.
------
Matt Kirk
Inventor of ImageJVI
09-18-2012 01:53 PM
If you open the block diagrams of the VIs suggested by crossrulz, you can see how NI does it. The PtByPt VIs accumulate the specified number of points and then operate as a circular buffer, discarding points which are no longer needed.
Lynn
09-18-2012 09:21 PM
Yes, looks like I have misunderstood the response. All were very helpful, I appreciate that and I am using PtByPt VIs.