LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset feedback node

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.

0 Kudos
Message 1 of 6
(3,874 Views)

Original attachment was not legible...hopefully this one is better.

0 Kudos
Message 2 of 6
(3,867 Views)

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.

0 Kudos
Message 3 of 6
(3,860 Views)

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.

0 Kudos
Message 4 of 6
(3,838 Views)

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.

0 Kudos
Message 5 of 6
(3,829 Views)

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.

0 Kudos
Message 6 of 6
(3,811 Views)