10-26-2010 06:50 PM
Hello.
The community has posted a few examples of how to reset a feedback node, but I'm not sure I understand these examples. What I'd like to do is reset the feedback node that resides within a nested for loop. i.e. Whenever I actuate the "collect" boolean, I want the "loop count" indicator to start at 0...and then increment (+1) within the nested for loop...and then reset to 0 if I select the "collect" boolean...and then increment...etc.
Thanks for any guidance/suggestions.
10-26-2010 07:00 PM
Original attachment was not legible...hopefully this one is better.
10-26-2010 07:16 PM
Right click on the feedback node, and select move initializer one loop out. You could also replace the feedback node with a shift register.
PS
Use pngs for pictures of code, they are much smaller and aren't blurry.
10-27-2010 10:13 AM
Nope.
Moving the initializer out one loop does not solve this problem. The feedback node continues to "remember" the previous value. If the loop count increments to 19...the next value (after actuating the "collect" boolean") is 20...and not 0.
10-27-2010 10:41 AM
Did you put a 0 constant into the intializer node once you moved it out a level?
Post your latest VI so we can see what you are doing now.
10-27-2010 12:51 PM
As others have suggested, I've replaced the feedback node with shift registers that are wired through the loops of interest. This has provided the solution that I was interested in. Will post an image of the vi later today.
Thanks to the community for their ideas.