09-10-2008 12:59 PM
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
09-10-2008 01:18 PM
09-10-2008 02:01 PM
09-10-2008 02:22 PM - edited 09-10-2008 02:27 PM
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.
09-10-2008 04:10 PM
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.
09-10-2008 04:21 PM - edited 09-10-2008 04:21 PM
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.)
09-10-2008 04:34 PM