LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can a combo box have multiple values per single display item?

I am searching for a control that passes two predetermined physical channels when selected/active...
0 Kudos
Message 1 of 4
(3,543 Views)
You don't really need a special control to do this. You can simply use a dropdown menu (or combobox if you prefer) to index out an array of any size:



Of course, you can also create an XControl to do what you want.

EDIT: Fixed indexing.


Message Edited by smercurio_fc on 06-13-2008 09:30 AM
0 Kudos
Message 2 of 4
(3,538 Views)

Thank-you smercurio_fc for your fast response...

I'm playing around w/ a ring & combo box control right now.   Your suggestion to use an output index on an array was very helpful, and has led me to additional questions:

1.  Upon operating the ring and combo box I could not select multiple items.   Either I'm mis-operating the controls, or they do not have this functionality.   This is a very important requirement.   Is there a control that allows multiple item selection and outputs an array of indexes?

2.  The table I wish to reference is 2D and will contain constants for my VI(physical channels, voltage calibrations, etc...).   I would like these data to be saved in the construct of the VI, otherwise I will be required to load them from a file everytime I execute.   Is there a control that can be used as a data container?

0 Kudos
Message 3 of 4
(3,518 Views)
Rings and comboboxes are single-selection controls. This is not specific to LabVIEW, as it's a generic user interface operation. To select mutlple items you can use a Listbox. Change the selection mode to "1 or more items", and you'll get an array.

If you have to save the 2D information with the VI you can simply have it as a constant on the block diagram, as the figure above shows. The datatype of the 2D array can be anything. If you wish to use a control you can save the value of the control by right-clicking on it and selecting "Make Current Values Default" and then save the VI.

Obviously, if the data changes you will need to update the VI. Normally if this is information like channels and calibration values it's kept in an external file and read in when the program starts up.
0 Kudos
Message 4 of 4
(3,508 Views)