It is very difficult to make sense of your diagram, because all the control references are missing, so it is not possible to tell the various data sources apart.
Where is the data coming from? How do you prevent race conditions between the acquisition and analysis parts?
Overall, the diagram is overly complicated and very hard to read. For example clearing the array does not require reading the old array, measuring it's length, followed by "delete from array", followed by writing back to the array. Why don't you just wire an empty array to it? Same result!
🙂You go to tremedous lenght calculating a simple array average, using numerous property reads and indexing arrays inside FOR loops. There is "mean.vi" that does it in one step. (If you only
have base LabVIEW, it might not be available (?), so use "Sum" and divide by n. No loop needed). To find the largest element in an array, use "Array Max & Min" from the array palette, again in one simple step.
I would highly recommend going over some LabVIEW tutorials or look at some of the shipped examples. Make yourself familiar with basic programming concepts such as auto-indexing at loop boundaries. An "index array" wired to the loop counter is never needed.
I suspect that your problem is due to a race condition between acquisition and analysis code, but there is no way to tell unless you include all control references and also the companion VI that gets the raw data from the instrument.