LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert 1D array a combobox

Solved!
Go to solution

I wondered if it's possible to convert a 1D array of VISA Resource Names (COM Ports) and convert them to Strings then input these into a combobox? I'm hung up on the first part.

0 Kudos
Message 1 of 9
(3,313 Views)

Hello

 

the solution is

New-1.png

 

Regard's

EricC

Ingénieur d'Application / Développeur LabVIEW Certifié (CLD)
Application Engineer / LabVIEW Certified Developer (CLD)
0 Kudos
Message 2 of 9
(3,305 Views)
Solution
Accepted by topic author Eric1977

Hi,

 

Please see attached !

 

Best,

 

J.

0 Kudos
Message 3 of 9
(3,302 Views)

What is the function your using to convert the VISA to a string?

0 Kudos
Message 4 of 9
(3,301 Views)

The function is "Type Cast".

 

It is located in Numeric > Data Manipulation palette.

0 Kudos
Message 5 of 9
(3,298 Views)

Why do you use "type cast" to convert visa to string ?.

it is a complexe way to do the job !!!!

 

Regard's

EricC

Ingénieur d'Application / Développeur LabVIEW Certifié (CLD)
Application Engineer / LabVIEW Certified Developer (CLD)
0 Kudos
Message 6 of 9
(3,290 Views)

You're right : "Concatenate Strings" function is much better.

 

Best,

 

J.

0 Kudos
Message 7 of 9
(3,285 Views)

Of course a more general solution can make use of a vi server referance to the combo box and the Configuration API functions.  Here is an example.

1.png

 

Since we don't often see examples using this API I thought it would be a good Idea to show how powerful this can be for programatically determining what is connected.  That sys hw Property node has some awefully interesting properties in it that can be explored.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 9
(3,275 Views)

OK, I have one other question.

 

When I use the code below, I return COM1, COM3, and LPT1. On another computer, I return ARSL1::INSTR, ASRL2::INSTR, and ASRL10::INSTR. What gives? Do I need to update teh VISA Runtime? If so, what is the latest version?

 

I'm rinning 2010 SP1.

0 Kudos
Message 9 of 9
(3,233 Views)