06-30-2023 04:27 PM
Hello everyone!
I am new here. I have a question about the Feedback Node.
My Feedback Node always resets to Default Mode for every loop instead of memorizing the previous value. Please help!
I have tried the Shift Register as well but still same result
Below is my code. I want to use the value of NewVal, in one event of my event structure, as a control for another event. However, the Feedback Node always returns to the Default Mode everytime I run something else but not the Value Change button of the events.
Please help!
06-30-2023 04:41 PM
Your output tunnel is set to "use default if unwired" and is not wired across in all cases of the event structure. Whenever such an event fires, the value gets reset.
In general, we don't like to truncated pictures. Please attach the VI.
06-30-2023 04:42 PM
If you look on the border of your event structure you can see that the terminal leading to the node is set to "Use default if unwired". That means it resets to False every time any event other than the one that sets it is run.
You need to un-check that option, then for every case where you don't want to change the value, create a loop from the input terminal to the output terminal.
06-30-2023 04:46 PM
I would also strongly recommend to rethink your code architecture in general. I see glaring problems that will bite you down the line.
07-03-2023 02:35 AM
Why do you have the feedback node outside the event structure? Which other events need to know what you did previously?