07-12-2013 12:45 PM
Hi I'm using the Basic Serial Write Read example vi in LabVIEW to communicate using the serial port. Instead of having a write box on the front panel connected to the VISA Write in the program I want to create a drop down menu on the front panel to be able to choose from a variety of commands. Is there a way I can program multiple commands into the block diagram and choose one of them on the front panel to send to VISA Write? For example, the commands to choose current are I/E\s0\r for 1 A, I/E\s-1\r for 100 mA and so on. I want to be able to choose between 1A, 100mA, etc on the front panel and have the code send the corresponding function to VISA Write. Is this possible?
07-12-2013 02:58 PM
sure....i use a combo box with values match items, unchecked
07-16-2013 08:12 AM
where do you list the values and the codes?
07-23-2013 09:47 AM
Can someone please answer me?
07-23-2013 10:04 AM
Usually you right-click the control and select "Edit Items." this pulls up the item editor.
However, this editor is limited because it only enables "Normal" display for strings. So just wire array constants to the "Strings and Values[]" Property like so:
07-23-2013 10:08 AM
To place a combo box on your front panel, 1. Right click on the front panel ==> go in the string & path menu ==> and select combo bo
2. Then Right click on the combo box and select edit items...
3. untick Values match Items
4. Edit your values.
I advise you to make a type Def with your combo box. It will be easier to add elements if you need.
07-23-2013 10:59 AM
Nevermind i figured it out thank you
07-23-2013 11:10 AM
Okay, please let us know the solution you came up with, so we might be able to use it sometime.
Cameron