04-12-2019 10:58 AM
Hello,
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.
Thanks,
hiNi
Solved! Go to Solution.
04-14-2019 11:17 AM
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.
Bob Schor
04-14-2019 01:58 PM
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.
mcduff
04-14-2019 09:27 PM
Very clever, McDuff!
Bob Schor
04-15-2019 07:07 AM
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).
04-15-2019 08:02 AM
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.
04-15-2019 09:33 AM
@jamiva wrote:
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.
@jacobson
You are correct; I just do not like "dirty dots" in my diagram.
mcduff