LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure problem with default 0, 1, 2

Solved!
Go to solution

Good afternoon,

 

I have a question about the case structure. If you use 3 cases, default 0, 1 and 2, like in the following VI.

 

How can you fix that the sum is never 3? Because when you turn on the switch 1 and 2 simultaneously it gives the sum 3 and the case will go in the default stand.

 

Thanks for the help.

0 Kudos
Message 1 of 5
(2,492 Views)

I actually wants that it's not possible to turn on switch 1 and 2 simultaneously, so that the sum never is 3.

0 Kudos
Message 2 of 5
(2,478 Views)

I recommend changing to using an Event Structure.  That way you react to when a switch is toggled instead of constantly polling.

 

What I would do is, with the Event Structure, have a case for each switch's value change.  In the event case, you use a property node to set the Disabled property of the other switch based on the current switches value (Switch 1 goes true, so disable switch 2)


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(2,473 Views)
Solution
Accepted by topic author desley

Use a radio button. You can replace the standard buttons with your wide toggles.

 

Lynn

0 Kudos
Message 4 of 5
(2,471 Views)

Thanks a lot for the solutions Smiley Wink

0 Kudos
Message 5 of 5
(2,453 Views)