LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to obtain the label of the COM ports?

Solved!
Go to solution

If I'm going to the system manager, I have this information:

 

Sans titre 2.png

 

but if I'm using the VISA find resource, I obtain this:

Sans titre.png

 

Is it possible to get the label?

 

 

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 1 of 18
(7,333 Views)
0 Kudos
Message 2 of 18
(7,206 Views)
0 Kudos
Message 3 of 18
(7,287 Views)

Use the Class = Ports and change the wild card * to something to narrow the search.

 

devcon find =Ports *

 

 

devcon [-m:\\<machine>] find <id> [<id>...]
devcon [-m:\\<machine>] find =<class> [<id>...]
Find devices that match the specific hardware or instance ID.
This command will work for a remote machine.
Examples of <id> are:
* - All devices
ISAPNP\PNP0501 - Hardware ID
*PNP* - Hardware ID with wildcards (* matches anything)
@ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID)
<class> is a setup class name as obtained from the classes command.
Devices are listed as <instance>: <descr>
where <instance> is the unique instance of the device and <descr> is the descrip
tion.

Omar
0 Kudos
Message 4 of 18
(7,267 Views)

Try this: 

 

0 Kudos
Message 5 of 18
(7,263 Views)
Solution
Accepted by topic author Pierre_F

Try this:

 

Example_VI.png

 

With the list:

(i have a special virtual COM TCPIP port on my machine, this gives error that is why the first element in the array indicator is empty for me)

 

Example_VI.png

 

Message 6 of 18
(7,261 Views)

Hello,

 

Alternativelly, the labVIEW example called "show all hardware" uses the System Configuration API and its property nodes to retrieve information about all devices that are connected to your PC. You might want to have a look to the "Ressource Name"...

 

Best regards,

Pierre-Emmanuel BELLES
Certified LabVIEW Developper
Certified TestStand Architect

0 Kudos
Message 7 of 18
(7,151 Views)

Hello,

 

I have a question somewhat related to this only. When I run by Conex servo motor it is connected to COM2 but whenever I run the lab view program it gives me a list from the Select device block which is in the driver of the Conex-CC example and it gives me a list of COM's connected and everytime I have to choose the COM2 and press ok. 

 

I am trying to make it a constant as I am always using COM2 for my motor, so how can I make it a constant that it never asks me and that pop up window doesn't shows up and it selects COM 2 by it's own.

 

Thanks.

0 Kudos
Message 8 of 18
(7,117 Views)

You should start a new topic as your problem is different.

 

BUT:

"run by Conex" What does that mean?

"Conex-CC example" What is that? Is that a LabVIEW VI? If it is a VI then you will need to edit the VI and "hard" code COM2.

But what if one day you change the COM port?

You could write some code to go search for the correct COM port. Can you query the Conex for some type of ID? 

 

Omar
0 Kudos
Message 9 of 18
(7,112 Views)

Hello Omar.

 

Sorry, that was a typo error "Run by conex" I wanted to say run my conex servo motor.

 

Conex-CC example yes is a VI and it is the VI which was already present as an example in driver's I downloaded from NI's website to run my Servo motor in LabView.

 

Changing the COM port, I am pretty sure I won't be doing that and the reason I want that to make my program run faster automatically instead of making it to wait for manual instructions.

I tried to make COM@ as a constant in the VISA resouce names but that didn't help. Can you help me in that a bit, as I am a newbie. I can upload some pictures if you want to make it more clear what I want.

 

Thanks.

0 Kudos
Message 10 of 18
(7,102 Views)