LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change the state of button when another button is pressed

Solved!
Go to solution

Hi all, 

 

I have a pretty straightforward question but just cant figure out how I can achieve it...I am trying to switch between two types of waveforms (sine and square) on a graph using buttons and a case structure.

 

I currently have two buttons A and B. When I press A, it turns true and displays waveform 1. When I press B, B turns true and displays waveform 2. However when B is true, I have A still enabled as true (pressed)

 

I cant figure out how to change the state of A back to false when B is pressed and vice versa.

 

I am fairly new at Labview so if someone can refer to a post where its this is already answered or point to the right direction, that would be appreciated

 

Thanks

0 Kudos
Message 1 of 3
(4,008 Views)

Hi

I have attached a VI hope it may solve your problem.


Thanks,

Ninad Regundwar
Junior Engineer | ARAV Technologies | www.aravtech.com
0 Kudos
Message 2 of 3
(3,996 Views)
Solution
Accepted by topic author cbenson90

Instead of cluttering the code with event cases (!), hidden controls(!), value properties(!) and local variables(!) (as suggested above but not recommended at all!! Besides, it does not even work correctly!), all you need is a radiobutton control that also allows "no selection". See attached (LabVIEW 2013). You could also add a third boolean for the sine wave and disallow "no selection" to make the code even more self-documenting.

 

I made the radiobutton container transparent to match your existing style.

 

Download All
Message 3 of 3
(3,982 Views)