LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with boolean controls mechanical action

I'm new to programming labview and I have a problem. I'm trying to control a dielectric analyzer to switch between two voltages (1800 & 2640VAC). When I switch to the higher voltage I want to also close a relay contact. I have the drivers supplied by the manufacturer which I am able to customize. I want to be able to create a pushbutton control that when up is 1800 and when down is 2640 (also controls relay). Right now I'm only able two create two buttons, one for each voltage. Is there a way to create a button like want that will also only be read by labview one time. I am included the drivers and my code.
 
Thanks in advance
Download All
0 Kudos
Message 1 of 3
(2,778 Views)
Set a single boolean control to be either "Switched when pressed" or "switch when released"  These change state only when the you press them or release them  (I prefer release because it gives you the chance to drag your mouse off the button in the event you want to cancel yourself mid-press).  The true state of the button represents one voltage, the false state the other.  Then you can feed the boolean into a case structure or boolean comparison selector as the case may be.
 
As for reading 1 time, it depends on what you mean by that.  If you only want to take action only when the value changes, you may need to add code to your loop so that it compares the current value to the previous value and only does an action by way of a case structure when the values are different.
0 Kudos
Message 2 of 3
(2,760 Views)
Thanks for yor help.
0 Kudos
Message 3 of 3
(2,747 Views)