ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

toggle boolean buttons

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
(9,936 Views)
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
(9,930 Views)
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
(9,925 Views)
Chris,
 
I'm using labview 7.1 and can not open the vi
 
Thanks
 
James
0 Kudos
Message 4 of 14
(9,915 Views)
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
(9,910 Views)

James,

Try this one.

Jim

LV 2020
Message 6 of 14
(9,905 Views)
There is no need for any local variables, complicated logic and deeply stacked events.....
 
All you need is a radiobutton control. 🙂
 
 
0 Kudos
Message 7 of 14
(9,891 Views)
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! 🙂
 
 
Message 8 of 14
(9,884 Views)
Altenbach,
How did u make a single boolean object with two button (start/stop) appearance ?
thankyou.
Message 9 of 14
(9,863 Views)
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
(9,838 Views)