LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

toggle boolean buttons

Highlighted
How can I use one button to change the state of another and vice versa.
I have two buttons stop and start.
when I push the start button (condition goes true) I need the Stop button (condition is initially true) to become false.
 
Thanks in advance
 
James
0 Kudos
Message 1 of 14
(4,139 Views)
Highlighted
Stop is  NOT Start and vice versa.

You can either use locals or property nodes to accomplish this.
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 14
(4,133 Views)
Highlighted
James, property nodes are one way to do this. Please see the attached example.


Message Edited by Chris_D on 11-29-2007 02:05 PM
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 3 of 14
(4,128 Views)
Highlighted
Chris,
 
I'm using labview 7.1 and can not open the vi
 
Thanks
 
James
0 Kudos
Message 4 of 14
(4,118 Views)
Highlighted
James,

Try using an event structure.  Capture the value change event for the buttons and when one goes true, set the other to false via a property node or local variable.
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 5 of 14
(4,113 Views)
Highlighted

James,

Try this one.

Jim

LV 2013
Message 6 of 14
(4,108 Views)
Highlighted
There is no need for any local variables, complicated logic and deeply stacked events.....
 
All you need is a radiobutton control. 🙂
 
 

LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 7 of 14
(4,094 Views)
Highlighted
An even simpler option would be to use a single boolean that contains a combo picture of the two states.
 
You only have exactly two states: (1) Start|Stop and (2) Start|Stop, right? So a single boolean can fully describe the overall state!
 
Here's a quick draft. No code needed at all! 🙂
 
 

LabVIEW Champion. It all comes together in GCentral GCentral
Message 8 of 14
(4,087 Views)
Highlighted
Altenbach,
How did u make a single boolean object with two button (start/stop) appearance ?
thankyou.
Message 9 of 14
(4,066 Views)
Highlighted
He created a custom control and created and inserted 4 pictures for the different states of the boolean.

Although a very clean solution, the solution with some coding is faster to accomplish and more flexible if requirements change.


Message Edited by andre.buurman@carya on 11-30-2007 08:56 AM
Regards,
André (CLA, CLED)
0 Kudos
Message 10 of 14
(4,041 Views)