I posted too hastily. As you advised, I initialized at each loop entry. I am about to connect this program to a real test setup. Thank you all so much.
Except you are constantly resetting the average, not just the first iteration. The i = 0 is the simple way to only initialize on the first iteration of the loop.
If you intialize it on the first iteration then you should stop seeing the data from the previous call.
Although if you are seeing this just from using the run arrow then it might be samples buffered from your DAQ instrument?
Thank you for correcting my mistake. I will use this.
In my program, once RUN button is pushed, operator is prompted to replace test samples multiple times and measurement is repeated. The first measurement is okay. But all subsequent measurements show old data affecting new average. Initialization upon Mean PtByPt loop entry will solve the problem.