03-27-2019 08:52 AM
Hello Guys,
I need a help with the feedback node, I have a feedback node inside a case structure and the case selector is a button. So basically I use this for a instrument control, for example if I want to move the machine in x-axis, I press the case selector button and the machine moves.
The problem here is, I have two case structures for front and back movement of the X-axis, so one button on each case selector.
For this, I use a feedback node but the problem here is for the intializer of the x forward movement feedback, I use the last value of the x reverse, likewise for the initilaizer of the x reverse, I use the last value of the x forward. But I cant do this continuously as we know that the initialiser of the feedback works only for the first time and the next time it doesn't gets updated until I stop while loop and the start again for the initialser to work.
So is there anway to get around this, is it possible to reintialze the feedback node within the case structure, I checked some similar questions regarding this but couln't find a proper solution.
Anyhelp would greatly aprreciated.
Thanks in advance
Solved! Go to Solution.
03-27-2019 09:18 AM
It is harder to offer help when there is no VI for us to look at, just a paragraph of words.
Based on what I read, it sounds like you should be moving your feedback nodes out of the case structure, or even use a shift register so that you can change values as necessary, or if you have case where nothing changes, then you just wire the value through the case structure.
03-27-2019 09:59 AM
Here is the VI
03-27-2019 10:36 AM
Actually that is a picture of a VI.
Put a shift register on your outer while loop.
What does X+ indicator mean vs. X- indicator? Shouldn't there be just a single X value indicator?
Wire your X wire through both case structures where the value gets modified in the True case and nothing changes in the false case.
03-27-2019 04:14 PM - edited 03-27-2019 04:17 PM
Also, move the VISA initialization outside of the while loop. (VISA Open and "ASRL End Out" property node)
Add a VISA close after the loop
03-28-2019 04:18 AM
X + means the output that is coming if I press the X + button, X- is the output that is coming if I press the X - button.
03-28-2019 04:22 AM
I didn't understand fully what you said, what you mean by wire the X wire on both cases?
03-28-2019 06:57 AM
I believe this does what you're trying to do. With a little more thought it could probably be made even less Rube-Goldberg.
03-28-2019 07:03 AM
@shek123 wrote:
X + means the output that is coming if I press the X + button, X- is the output that is coming if I press the X - button.
Yes. That makes sense for buttons. It doesn't make sense to have an X+ indicator value and an X- indicator value. You only have 1 X-axis, so how can you have 2 X values? !!
03-28-2019 07:17 AM
yes thats true, wow using a gate functions never crossed my mind.
Thanks