06-06-2009 02:02 PM
how do I restart a feedback loop inside a for loop that is inside another loop?
example: I want to run my outermost for loop two times.
I also want to run the second for loop, which is inside the first, three times.
Inside this second for loop is a feedback loop that starts at 1 and adds 2 to it each time the second loop runs: 1, 3, 5
My question is how do I make it so that the feed back loop will restart at 1 when the outer for loop reinterates?
so tha I get 1,3,5 for the first run of the outer for loop and 1, 3, 5 again for the second run. Right now I am getting 1, 3, 5 for the first run and then 7, 9, 11 for the second run.
Thank You all
Solved! Go to Solution.
06-06-2009 02:22 PM - edited 06-06-2009 02:23 PM
Please attach an example and tell us your LabVIEW version.
If you have a recent labVIEW version, you can just move the initializer terminal to any of the stacked loops surrounding it. Then initialize it there.
If you have an older LabVIEW version, you might need a little bit more code, e.g. another shift register. Nothing serious, though. 😉
06-06-2009 09:41 PM
Thank you, that helped. I had a newer version so your solution worked.
Thanks again