LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

combo box

Hi,

 

I want to display some different bits of information on the front panel but this same information for a number of different it of equipment. I though about some form of drop down box so i could select the name of that bit of equipment and this would bring up the associated inforamtion for this equipment. not sure if it matters but would require 15 different option to choose from. I looked at the combo box but if i'm hnot really sure i understand what it as and if it is what i am looking for? If not a combo box then what?

0 Kudos
Message 1 of 11
(4,285 Views)

It would be easier to help you if you provided an example of the data and how you want it to show.

 

If you've attempted to use a combobox and are having problems, then please attach a VI.

0 Kudos
Message 2 of 11
(4,279 Views)

I usually find that the combo box isn't what you want to use.  It's called a "combo" box as it's a combination of a pre-populated list of items but also supports the ability to type in your own selection that wasn't in the list.

 

What you probably want is either a "ring" or "enum" control.  Both offer the ability to use a "drop-down" box like you're looking for.  I personally usually use the ring and enum controls from the "System" palette as the ones from the standard/classic/silver palettes don't have that handy down arrow on the right side to indicate that it's a drop-down.

 

A ring control is usually used when you want to be able to either change what's shown in the control while the program runs or when you want to set the N numeric values they match with to be something other than 0 to N-1 in ascending order.  An enum is best if you don't need to modify the possible values during run time and you don't want it to be possible to set a value that isn't one of the predefined options.

0 Kudos
Message 3 of 11
(4,273 Views)

Both many thanks for the reply. I will check these out. Aoplogies i only have the code i want to implement this idea to, just wanted to get a pointer as to what direction to go in first.

 

Thanks again

 

Rob

0 Kudos
Message 4 of 11
(4,267 Views)

@Kyle97330 wrote:

I usually find that the combo box isn't what you want to use.  It's called a "combo" box as it's a combination of a pre-populated list of items but also supports the ability to type in your own selection that wasn't in the list.


But there is a very simple setting you deselect called "Allow Undefined Strings".  With that deselected, you cannot enter your own strings.  You have to select a value that is in the list.

 

If you are looking for a drop down menu that you can change at runtime, then you want either a Ring or a Combobox.  A ring is a numeric data type while a combobox is a string.  So for me, it is a matter of what you want to keep track of.  I find that most of my applications care about the string, so I use a combobox.

 

For both the ring and combobox, there is a property that you can write to called "Strings[]" that can be used to set the list of items in the dropdown.


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
Message 5 of 11
(4,263 Views)

Thanks guys. Think i more confused now. I'll have to have think about it but seems tough.

0 Kudos
Message 6 of 11
(4,244 Views)

@potofjam wrote:

I'll have to have think about it but seems tough.


It is not tought at all.  If you know how to create a property node and how to read a terminal, you can use the combobox.

 

Where are you confused?  Perhaps you should elaborate a little more on exactly what you are trying to do and then we can give you more directed examples.


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 7 of 11
(4,235 Views)

If you have multiple different types of controls and indicators associated with related, but slightly different instruments you might try a tab control with each tab showing the name of the instrument and the contents of each tab page showing the info specific to that instrument.  You can also use the output of the tab control itself to keep track of which instrument is currently selected.  

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 8 of 11
(4,211 Views)

OK thanks,

 

I have attached my code so far. On the left i have of filters in form of sub VIs, These represent equipment called ZpRs. on the botton one, ZPR0 i have extracted certain bits from from the chucnk of data which are now represented on the front panel by boolean LEDs. These are to represent alarms and hopefully soon how many times this alarm has been raised. I will have to do this for each of the Sub VIs so want to be able to have a menu to select the ZpR so that only the boolean LEDs would show for that Zpr.

 

Make sense?

 

 

I have attached the main VI and the Sub VI for ZpR0.

 

Thanks again

 

Rob

Download All
0 Kudos
Message 9 of 11
(4,209 Views)

I remember this VI!  Good to see the cleaned up code and indicators.

 

NIquist's idea of the tab control is a good one.  You can put a cluster on each tab and pick the tab you want to show.  One possible bad aspect is that 15 tabs is a lot of tabs to put on a tab control.  I would then consider making that tab control an indicator and hide the tabs.  Use the ring has a control wired to the terminal of the tab control indicator.  Now when you change the ring, it will bring up a different page of the tab control.

 

0 Kudos
Message 10 of 11
(4,185 Views)