LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reinitializing Feedback Nodes

Hi all,

 

I was having a problem using feedback nodes in Labview 8.6.  I have a large a large flat sequence structure which contains various while loops in certain frames.  Many of the while loops use a feedback nodes and I used an initializer terminal to provide the first values.  The problem is that I want to run the entire sequence structure multiple times.  When I try to do this, the feedback loops carry the values from the previous iteration and do not reinitialize.  Is there a way to reinitialize the feedback nodes throughout the program?  Maybe I can use some type of shift registers?  I've attached the VI for reference, but it's very messy at this point.  I will try to clean it up, but in the meantime does anyone have any advice.  Any help would be great.  Thanks - Dan

0 Kudos
Message 1 of 7
(4,228 Views)
If I change the VI to a subVI and put that in a while loop (instead of an internal while loop), will that reinitialize the feedback nodes each iteration?
0 Kudos
Message 2 of 7
(4,224 Views)
I tried the subVI idea, but with no luck.  It still will not reinitialize.
0 Kudos
Message 3 of 7
(4,215 Views)

It is not very polite to attach a VI that is 20 screens wide and not tell us where to look. 😞

 

Can you reduce your code to some simplified example that only contains a single feedback node and fits on a postcard.

 

Typically yo reinitialize a feedback node by feeding it a default value. You can also move the initializer terminal out by one or two loops as desired. Move it out to the next loop boundary an initialize it there. See if this help.

 

Message Edited by altenbach on 09-10-2008 12:27 PM
Message 4 of 7
(4,213 Views)

Sorry about that.  I've been in the process of cleaning it up.  Here is the basic idea of what I was talking about.  It's a simple while loop that cumulatively sums up a value.  It starts with 2 and adds 1 until it equals 8.  I would like to repeat this procedure 5 times.  This would produce an output in the array of 8,8,8,8,8,8.  However, I'm not sure how to make the feedback node reinitialize to 2 each time the outer while loop iterates.  Instead the feedback node is never reset, and the value is simply increased cumulatively (8,14, etc.).  I hope this makes my question more clear.  Thanks again for the help.

 

 

0 Kudos
Message 5 of 7
(4,191 Views)

As I already mentioned in my last message, move the initializer terminal out one loop (right-click the feedback node...move out one loop).

 

 

 

(You have it set to globally initialize, thus it will only initialize it once per run. Check the online help.)

Message Edited by altenbach on 09-10-2008 02:21 PM
Message 6 of 7
(4,189 Views)
That worked great.  I didn't know how to move the initializer terminal.  Thanks again for all of the help. 
0 Kudos
Message 7 of 7
(4,185 Views)