LabVIEW: Help with some logic

Attached below is a snippet from our code. What I am trying to do is take a joystick button into a routine that makes that input “sticky.” (First Logic Input). This is at the lower left of the snippet, and should be apparent. This is intended to control a solenoid.

What I want to do is take another T/F logical input (Second Logic Input) and be able to force the solenoid off when this second logic input is true. I’ve added another select function at the upper right of the snippet, and I believe this will solve part of what I am trying to do, but I don’t think it is the correct solution.

As this code is written, I am fairly certain that as soon as the second logic input returns to false, the “sticky” first input will retain its prior state and force the solenoid back on if the “sticky” input was previously True. What I want is the second logic input to do is reset the whole function and turn the solenoid off. I am just not sure about how to do this.

I hope my question makes sense, and I hope the snippet relays how the code currently looks. Sorry about the broken wires; this is just a sub-selection of the larger program, and the wires broke when I took the saved the snippet.

Any help is appreciated!


You are correct about the “sticky” input returning after the 2nd input goes back to False. You need to inject the 2nd input logic into your 2nd feed back loop (the part that holds the Toggle state). Effectually forcing the chance in the toggle feed back
2nd%20logic !

Exactly. Thank you for your response. Here is the code in snippet format for future reference:


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.