From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-06-2021 02:21 PM
Hi, yeah, the script is a work of art, however, it doesn't seem to perform this idea of a rolling stack and average for each new array in. I feel close and fully expecting a penny drop moment in the coming days. Thanks again for your effort in helping to resolve this problem.
12-06-2021 03:04 PM
Here's what I had in mind (you can transpose the graphs if desired. Currently rows run along the x-axis). Near x=0, averaging is poor because of limited samples, but later all values are near 0.5 as expected.
12-06-2021 04:03 PM
Yeah, I think you might have something here. I see didn't use tunnel indexing when I tried, so that explains where I was going wrong and my past query. I am partway through a circular buffer concept that seems to also work, but I'm going to test out your approach properly to compare. I'll report any findings to this thread to spread the knowledge.
Thanks.
12-06-2021 04:33 PM - edited 12-06-2021 04:34 PM
@narra_1985 wrote:
I am partway through a circular buffer concept that seems to also work, but I'm going to test out your approach properly to compare. I'll report any findings to this thread to spread the knowledge. .
The 2D array inside my VI is a circular buffer, just implemented fully "in place" where the new data replaces the oldest, keeping track of the insert point. An average does not depend on order, so make sure not to shuffle tons of data around with each iteration.
12-12-2021 06:13 PM
Hi Alterbach,
Sorry, yes, you are quite right regarding the circular buffer. Also, I am pleased to announce that I managed to come up with the working solution last week and have been busy implementing my little project since then, so excuse me for not publishing the solution as of yet. My solution wasn't quite the same as yours, however, I definitely benefitted from our back and forth (actually you inspired me to think a bit deeper about this than I may otherwise have gone).
...anyway, solution on the way...