In LabVIEW, how are variables set to have a value? Our programmers are trying to have a variable set to a dynamic value then have the program read it as such.
We want to have Joystick 1: Button 1 set the value to 0, Joystick 2: Button 1 set the value to 1. Then we want to put that value into the solenoids, to get them to open or close depending on the value of the variable.
Thank you in advance for your help.
Here are two answers.
The first picture goes to the root of what you need to do to set a solenoid. It doesn’t bother to remember the last value sent to the solenoid, because the solenoid will remember whatever it was last set to. It doesn’t need to be set to the same value over and over.
The second picture remembers the value from the last button pushed and keeps setting the solenoid to it over and over again even though it’s an unnecessary action.
There are still more ways to accomplish this kind of action. These are only examples.
Variables are not used in LabVIEW, a data flow language, the way you’d use them in a procedural language.
What our team has done is make a sub-vi that just has an indicator and a control (Both wired to each other in the block diagram). Then you add the control/indicator to their respective connectors. This seems to work.