LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Restting A Feedback Node

Hello,

 

In the attached VI the counter is not resetting. I am trying to reset it on every cycle of the outer loop.

 

 

 

 

Message Edited by MCU on 03-16-2009 05:22 PM
Download All
0 Kudos
Message 1 of 9
(4,667 Views)

Is this what you are trying to do?  If not let us know.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Message Edited by jmcbee on 03-16-2009 04:29 PM
Message 2 of 9
(4,657 Views)

Right click on the feed back node and select Move Initializer out one loop.  Right now it is set to Globally Initialize.

 

For your example, a wait statement of about 500 msec in the inner loop and an indicator on the wire makes it easier to see what is going on.

Message 3 of 9
(4,655 Views)

Hello,

 

@jmcbee: That was the idea thanks.

 

In a While loop, Ravens Fan solution also worked.

 

Regards

 

MCU

 

Message Edited by MCU on 03-16-2009 05:54 PM
Message Edited by MCU on 03-16-2009 05:54 PM
Message 4 of 9
(4,640 Views)

Hello,

 

 

In my application I have a counter subVI that works like the Case structure above. However, on every cycle of the outer loop, I require the feedback node to reset (so that the count is zero when the inner loop runs again).

 

How is this best done?

 

Thank you
0 Kudos
Message 5 of 9
(4,587 Views)
Hi MCU, I'm not sure I understand the difference between this question and your last one.  Are you having trouble creating a subVI?
Message 6 of 9
(4,581 Views)

How is this different from your original question?

 

I already gave you an answer and you said that it worked.

 

From reply #3 "Right click on the feed back node and select Move Initializer out one loop.  Right now it is set to Globally Initialize."

Message 7 of 9
(4,579 Views)

Hello,

 

In the original question the feedback node was placed directly in the loop (as in the picture). To reset it on every outer cycle I could move the node initializer to the inner loops border.

 

Now I have put everything inside the inner loop into a subVI (including the feedback node), so I cannot place the node initialzer on the border of the inner loop (since the feedback loop is now in a subVI).

 

How do I reset the node from the outside?

 

Thanks

Message Edited by MCU on 03-18-2009 04:21 PM
0 Kudos
Message 8 of 9
(4,571 Views)

The inner loop should be in your subVI as well as what is inside of it.   Is the inner loop in the subVI you just created or is the subVI in the inner loop of the top level?

 

 

There is nothing wrong with using a feedback node like this, but I am curious why you chose it over using a shift register.  It seems to me that shift registers are more intuitive, but maybe that is because I never use the feedback node.

Message Edited by jmcbee on 03-18-2009 03:33 PM
0 Kudos
Message 9 of 9
(4,565 Views)