LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt User for Input: disable all outputs but one?

Solved!
Go to solution

Hi,

 

I would like to accomplish the following:

 

Prompt user for Input - from a list of four choices, user selects one choice

All the other choices (all false) are disabled.

 

For instance, from the attached Screenshot:

if I select 2.4 mm male, then all the commands associated to the rest of the choices are disregarded.

 

 

Does anybody know how I can do that?

Thank you in advance,

 

Nicolas

0 Kudos
Message 1 of 10
(1,520 Views)
Why don't you just create an array from the Booleans, use the Boolean Array to Number, and wire that to a single case statement?
0 Kudos
Message 2 of 10
(1,512 Views)

Instead of using a prompt, you could put the selections in a drop-down window such as an enum and feed that into one case structure.  Or a ring if you needed to control the selections programmatically.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 3 of 10
(1,499 Views)
Solution
Accepted by topic author htnicolas

Hi,

 

I think you requirement is to select any one among your four choices.Have a look at the attached VI. But you can select anyone at a time.

Hope this helps.

 

 

Download All
Message 4 of 10
(1,497 Views)

A radio button?

 

Lynn

Message 5 of 10
(1,483 Views)

I'd prefer a listbox.

 

Felix

0 Kudos
Message 6 of 10
(1,459 Views)

Thank you everybody for your help.

I'll go with GITA_A's solution. The others would work too, but I want a window to prompt the user to make his selection, as opposed to a drop down menu on the front panel for instance.

Thanks again,

Thank you GITA_A!

 

Nicolas

0 Kudos
Message 7 of 10
(1,432 Views)

GITA_A,

 

Can you quickly explain how to use the property nodes you used in your response?

I am recreating what you did step by step, I just put a property node on the block diagram.

How do i link it to one of the options (say 2.4 mm male)?

I don't see any wire coming into the refnum input of the ppty node of your example...

 

Thank you so much,

 

Nicolas

0 Kudos
Message 8 of 10
(1,420 Views)

If you use the property node from the Application Control functions palette, you can right-click your control and create a reference.  Wire this to the property node.  Another way would be to create the property node from the fp by right-clicking the control>>create>>property node.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 9 of 10
(1,416 Views)

Also, from a Property Node or Invoke Node you can Right-Click -> Link to -> then choose a control or pane of the FP.

0 Kudos
Message 10 of 10
(1,409 Views)