I downloaded the Metallic Theme environment and did not find a Visa Instrument Box in the suite. I would like to know how to get a Visa Instrument box to match up the other front panel items.
Solved! Go to Solution.
When designing a set of Custom Controls, the designer might not include all of the Front Panel controls, such as the I/O Controls (like VISA). Controls are more than "just a pretty face" -- there is LabVIEW "stuff" going on behind them, so it is pretty unlikely you'll be able to change a Combo Box into an I/O selector.
If you do a Web Search for LabVIEW Custom Controls, you can probably learn more, and decide if you really want to undertake such a design process for a single Control. You can also find some additional sets of Controls that might be of interest.
You can make your own control as suggested or you can try something like this: (You may have to change the filter on the Find Resource depending on what's connected, see help for further information)
You will need to set up your program to populate the Combo box in an "Initialization" type of state; after that you can use typecast and your control is good to go.
Not 100% sure but you might not need to do any casting. IIRC you should be able to just feed in the string to a VISA input as long as the text is correct (at least for the open function).
Here is a slight modification to mcduff's VI. I got burned a few times when population a Combo Box. You need to set the value (to something) after it gets populated. Populating the StringsAndValues does not change the current value.
So, if the ComboBox originally contains a bad VISA reference, it will NOT be overwritten. If the bad VISA reference "looks" valid to the user, they will never know otherwise.
Original Value in Combo Box does not get overwritten
I like to set the Value to a NULL string or to the first valid value in the list.
Here is a slight modification to mcduff's VI. I got burned a few times when population a Combo Box. You need to set the value (to something) after it gets populated.
Agreed. Thinking state machine here, but this goes with "initializing" the control.
You are correct; I just do not like "dirty dots" in my diagram.