09-29-2012 03:50 PM
I want to use a Combo Box in a VI to select from a list of strings to direct execution in TestStand.
I tried "wiring" the result of the combo box directly to an output terminal without sucess.
I tried "wiring" the output of the combo box to a string variable; wiring that variable to an output terminal without success.
(see attached files)
Can anyone give me an example of a VI that will select from a list of strings: {"Bob", "Mary", "Bill", "Jennifer",...} using a
combo box (or similar) control and routing the selected string to the output terminal?
Thanks in advance for suffering through this fundamental question.
David
Melbourne, Florida
09-29-2012 04:37 PM
Like this? Download both, and run the RunMe.vi
09-30-2012 09:02 AM - edited 09-30-2012 09:02 AM
I can't see the suggested code since it's in LabVIEW 2012, but if you're using a Combo box, then you can simply pass out the value of the combo box directly to a string indicator. No hoops needed.
If this is what is shown in the suggest code, then ignore this response.
09-30-2012 09:45 AM
Thank you for the reply, what is the name of the string passed to TestStand? I am trying Step.Result.Status (the vi used is a generic "action" step) and it does not seem to work.
09-30-2012 10:08 AM - edited 09-30-2012 10:09 AM
By "Selected string" I assume you mean the string displayed to the user rather than the value of the combo box. I would not use a combo box in this case. I would use a type defined enum instead. TestStand will display the string but uses the integer value for calculations and expressions.
09-30-2012 10:11 AM