LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the number of COM ports in a PC using VISA resource

Hi all,
I need to find the number of COM ports in a PC and their names programmaticaly.
Is there any direct method for this?
 
Presenty I am using the following method,
- find the VISA resources (ASRL?*::INSTR)
- Find COM port name by string processing the inteface Information ::Interface description property
Is inteface Information ::Interface description property format is unique? Is this a correct method?
VI is attached.
Please suggest..
 
 
0 Kudos
Message 1 of 2
(2,354 Views)

One suggestion I have is to set the search mode of the VISA find resource to only return the aliases.  Then you don't have to parse the return strings and just convert it to an array of resourse strings.

Also, I found a bug either in the online help or the VI itself.  I am using the evaluation version of 8.2 so I don't know if it exists on earlier or non-eval versions.

The bug is that if you use create (constant,control,indicator) for the search mode, the ring that in creates doesn't match what the online help indicates.  I'll attach a picture so show what I found.  Hopefully someone at NI can indicate the correct one and fix the bug (either the ring or the documentation).

0 Kudos
Message 2 of 2
(2,330 Views)