12-06-2013 11:31 PM
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
Solved! Go to Solution.
12-07-2013 12:23 AM
Hi
I have attached a VI hope it may solve your problem.
12-07-2013 01:34 AM - edited 12-07-2013 01:39 AM
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.