‎11-01-2018 05:31 AM
I have a nested while loop that runs for a number of iterations less than the number of elements in my array.
How do i ensure that on the next pass of the while loop the indexing continues from where it left off rather than going back to the start of the array every time?
Thanks!
‎11-01-2018 05:34 AM
Hi niallc,
I have a nested while loop
How does that look like?
I guess you have more than one loop…
How do i ensure that on the next pass of the while loop the indexing continues from where it left off
Keep your own index counter in the loop.
Use shift registers to store that index value for the next iteration.
As usual in LabVIEW you use shift registers to forward data to the next iteration of a loop…
‎11-01-2018 09:58 AM
So auto indexing is probably of.
So as GerdW mentioned, some shift registers are most likely required.
Instead of keeping the index in a shift registers, retrieving the element from a non-autoindexing array, you can also delete elements from the array that 'lives' in the shift registers.
(Arguably) a simpler concept. Sometimes convenient, but less efficient in most cases.
‎11-01-2018 08:16 PM
In my case I like to use GetSet.vi witch is a functional global variable. with this one, you can even see the data from another loop or even from another computer.
Benoit
‎11-02-2018 03:41 AM
"Continuing an array auto index after a loop has terminated in a functional global called GetSet.vi" doesn't add up...
You'll have to give a better explanation of what you want if you want us to help you. You like to use GetSet.vi how exactly?