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: 

Case structure

In a case structure, I have 2 options example 5 & 6. I put 6 as default. The problem is that even if I select 5 the program is automatically go to the default, why is that?
0 Kudos
Message 1 of 5
(2,991 Views)
How do you select 5? If it does the default case then it is probably not really receiving a 5 (probe the wire into the case selector and check)...If it is, could you attach the case and the wiring into the selector to a message here, I'll take a look at it for you.
0 Kudos
Message 2 of 5
(2,991 Views)
make sure you dont have a space after the value...
0 Kudos
Message 3 of 5
(2,991 Views)
Make sure that the name of the selection channel en the name in the case diagram are exactly the same.

Davy
0 Kudos
Message 4 of 5
(2,991 Views)
You had a question today about a text ring. You haven't by chance put a value of 5 into one of those and wired it to the case statement have you? A ring will return the index of the selected item and not the text. To get the text and use that for a case statement, use the property Strings[] and an Index Array function.
0 Kudos
Message 5 of 5
(2,991 Views)