LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

feedback node

Solved!
Go to solution

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

0 Kudos
Message 1 of 10
(3,825 Views)

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.

0 Kudos
Message 2 of 10
(3,808 Views)

Here is the VI

0 Kudos
Message 3 of 10
(3,800 Views)

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.

0 Kudos
Message 4 of 10
(3,792 Views)

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

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 5 of 10
(3,763 Views)

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.

0 Kudos
Message 6 of 10
(3,740 Views)

I didn't understand fully what you said, what you mean by wire the X wire on both cases?

0 Kudos
Message 7 of 10
(3,739 Views)
Solution
Accepted by topic author shek123

I believe this does what you're trying to do. With a little more thought it could probably be made even less Rube-Goldberg.

 

Example.png

0 Kudos
Message 8 of 10
(3,730 Views)

@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? !!

0 Kudos
Message 9 of 10
(3,724 Views)

yes thats true, wow using a gate functions never crossed my mind.

 

Thanks

0 Kudos
Message 10 of 10
(3,721 Views)