11-29-2017 03:58 PM
How can I make a boolean or switch that can be turned on manually then turned off automatically based on the value of some number? I'm using LabView2014
11-29-2017 04:31 PM
If you want a button to remain depressed even after LabVIEW reads its value, then make sure it has a "switch" mechanism (Switch when Pressed, Switch when Released, etc.). This can be changed by right-clicking on it and selecting the mechanical action. A "latch" mechanism will reset the value after it is read.
Now if you later want to write to the button control, when your value condition is triggered, then you have several options. You can use a local variable, or a value property, or write to control by index. However, these should never be abused. Do not continually write the same value over and over in a loop, as this will hog the CPU. Also, do not allow for your code to be reading from and writing to the control at the same time, this is known as a race condition and can lead to very hard to find behaviors.
11-30-2017 11:17 AM
Ok, the switch when released makes sense. The part I can't seem to get working is the switch release based on a boolean value. I'm probably going about this all wrong because I'm not a real programmer, just a faker :)... But I've managed to get most of the system working except this final part.
The system I'm working on uses FieldPoint modules to run lab equipment such as scales for weighing fuel, and pumps that sample fuel exhaust.
When fuel weight reaches zero (or near it) the pumps need to shut off and stop sampling.
Snippet attached of what currently exists.
Thanks for your guidance
11-30-2017 11:38 AM
Here is an example that will reset the push button.
11-30-2017 11:58 AM
Can't open the VI, I'm using LabView2014 😞
11-30-2017 12:12 PM
Try this one
12-01-2017 10:25 AM
This works, thanks! Now to figure out how to configure it
12-01-2017 10:26 AM
Do I need to put the FieldPoint device inside the case structure?
12-01-2017 11:01 AM
Yes, with modification. You'll probably want to add another condition such as Value > 5 AND Boolean (meaning Boolean == True). The reason is that you don't want to keep writing a False value if it is already False.
12-05-2017 11:18 AM
I'm stumped again. How can I get case structure to read the value coming from the Fieldpoint AI110?