LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I have multiple inputs into the selector terminal of a case structure

Hi everyone

 

I have a question on how to wire multiple inputs in to the selector terminal of a case structure. 

Currently, I have three switches, each switch determines different case. So if I switch the switch 1 is on, the numeric indicator will show 1. If the switch 2 is on, the numeric indicator will show 2, so on and so forth. However, the selector terminal will not allow me to wire multiply inputs into the case structure, I tried Bundle by Name, Bundle and Array to Cluster, but they did not work. I set the case structure with 3 cases, they are 1, 2 and 3.

 

Could someone help me please. I have attach an image and the VI of the work I did so far.

 

I have another question, is there a function which can toggle other switches to off when there is a switch has been toggled on.

 

Thank you very much

 

Tommy

 

Case structure.png

0 Kudos
Message 1 of 9
(3,689 Views)

Tommy,

 

i think you are looking for something like the attached VI.

 

If the user should only select ONE button OF N, you should exchange that buttons with a RadioButtons control.

 

hope this helps,

Norbert

 

EDIT: The attachment is created with LV 2011, not 2012 as the name indicates..... sorry for the confusion

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 9
(3,674 Views)

Thank you very much for the help. 

 

Could you explain how to configure the background colour of the radio button, please. I tried right click and properties, but no options for me to change the background colour.

 

Thanks

 

Tommy

0 Kudos
Message 4 of 9
(3,653 Views)

Tommy, attached find a cheeseball way of doing this that has given me a LOT of mileage over the years.  IT lends itself nicely to a couple of really good practices that NI recommend, but I have given you the bare-bones to "see under the hood".  

 

The recommended practices:

1. You can make this a nice tight sub-vi where you can put it into a core library of routines that you'll use over the years, even extending the logic to look only for changes, etc.

2.  If you are thinking about Front Panel design considerations, you'll want to use arrays of controls where possible, as that's a nice neat way of containerizing your switch for both the FP and Block Diagram.

 

Have fun.  I have TONS of these types of things, so feel free to PM me if you have any other needs.

 

Wes

 

 

 


--------------------------------------------------------------------------------------
Wes Ramm, Cyth UK
CLD, CPLI
0 Kudos
Message 5 of 9
(3,651 Views)

Hi

 

If you have a selection of only three options, you can use a System Mixed Checkbox.

 

You can use radio buttons as suggested earlier.

 

If you are using boolean, there is a better way to check if Boolean is true and to set a number for it.

 

Attached is a VI in LV2010SP1

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 6 of 9
(3,649 Views)

Hello Wes Ramm

 

Could you please post the vi in a lower version. I have LV2010SP1?

 

I could not see the vis attached in LV11, so if my post is redundant, please do not mind.

 

Thank you

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 7 of 9
(3,645 Views)

<Could you explain how to configure the background colour of the radio button, please. I tried right click and properties, but no options for me to change the background colour.>

 

Just use the brush tool

0 Kudos
Message 8 of 9
(3,641 Views)

My pleasure!!!

 

W


--------------------------------------------------------------------------------------
Wes Ramm, Cyth UK
CLD, CPLI
0 Kudos
Message 9 of 9
(3,640 Views)