FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

feedback node doesn't reset on "stop"

I've been having problems with my feedback nodes not resetting when I stop the simulation. When I wire a value to the initializer terminal, the node simply sends the value wired to the initializer terminal, instead of storing the input value for one loop. I have seemed to get around this with putting a "while" loop around the whole VI instead of testing with a "continuous run", however if I leave subVIs like this, they hang up the VI where they are used.

What can I do to get around all this?

~Marshal

Marshal Horn
0 Kudos
Message 1 of 4
(7,998 Views)

Marshal,

I don't know if I completely understand what you are trying to accomplish. Could you post a screenshot of your block diagram for reference?

If you are trying to access data from a pervious iteration of a loop in the current iteration might I suggest using shift registers. A tutorial on shift registers can be found here.

I have also included a screen shot of a block diagram demonstrating an initialized and an uninitialized shift register. Please let me know if you have any questions.

shift register.png

Mark
NI App Software R&D
0 Kudos
Message 2 of 4
(3,107 Views)

In addition to posting a screenshot, NJKirchner(one of our venerable LV Champions) has recommended a great tool that will help in elaborating the issue you are experiencing with your code. Here's his post.

The better we understand your issue, the better we can help!

-Emilie

0 Kudos
Message 3 of 4
(3,107 Views)

S'okay, I was simply expecting the feedback node to reset when I pressed "abort execution". I didn't realize Labview didn't differentiate between another call and another run.

The reason I'm not using shift registers is because I'm working on subVIs which themselves are not in a loop. I'll just wire up all the resets and reset everything before I test it.

Thank you, Emilie! There was also a thread on Chief Delphi that was asking about posting VIs more easily.

Marshal Horn
0 Kudos
Message 4 of 4
(3,107 Views)