12-31-2020 02:07 AM
Hello,
I have a while loop in which i am getting 5000 samples (values) on each iteration of loop. i want to hold that samples and needs to add that 5000 values with new 5000 samples.
In simple words, i have 1D-array which is updating on each iteration. i just simply wants to add new array elements with previous one. So that on last iteration i get the summed 1D array with 5000 values.
Attached is the VI which i am trying to do.
The problem is holding the previous value in the shift register as change its value with each iteration.
Please anyone can help.
Thanks
Solved! Go to Solution.
12-31-2020 05:02 AM
Why not post a VI? Now we need to recreate it...
Why not embed the image? Now we need to download, open and delete it.
You don't need a shift register and a feedback node. The serve the same purpose.
Here's the same with a shift register on the main loop:
The top shift register could be initialized with an empty array (preventing it to work as a buffer), or with a sized array of 0s (so the case can be removed).
12-31-2020 06:57 PM
It is impossible to troubleshoot from a truncated picture, so please attach your code and answer some questions.
12-31-2020 11:09 PM
Hi CARYA,
your solution just worked perfectly.
Thank you so much for your help.