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 and their names in a PC progarmmatically.
I am using the attached VI for that.
Is there any direct method for that?
Is this a correct method?
Please suggest..
SajK
0 Kudos
Message 1 of 7
(2,762 Views)
I've searched NI Forum and came up with this link that might help you
 
 
If there's some problem with the link. You can search by "List Available Com Ports"
 
Best regards
 
 
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 7
(2,742 Views)
The above utility doesn't seem to work in XP and LabVIEW 8.2.

To the original poster: It seems like you're trying to get the aliases out rather than the VISA resource name. Just out of curiousity, do you explicitly need the aliases instead of just using the full names. Also, you can simplify your code if you wire the "search mode" input of the "Find Resource" VI and use "Include Matching Aliases". This will return "COM1, LPT1", so you can delete some of the stuff you're doing with strings there.
Message 3 of 7
(2,724 Views)
Also, duplicate post.

Very annoying when people do this.
0 Kudos
Message 4 of 7
(2,722 Views)
Hi All,
I am sorry for posting the duplicate mail. It happend by mistake.
Thank you all for your suggestions.
 
Requires one more solution.
I am using a USB to UART bridge. It is getting detected in as COM3 in Measurement and automation explorer.
I am able to Communicate with the device connected to COM3 using Hyperterminal application.
If I am using VISA write or read, it is giving the following error.
"VISA:  (Hex 0xBFFF003E) Could not perform operation because of I/O error."
What could be the problem?
Thanks in advance.
SajK
 
 
0 Kudos
Message 5 of 7
(2,694 Views)
See this Knowledge Base Article and see if that fixes your problem.
0 Kudos
Message 6 of 7
(2,681 Views)

Thank you so much Mr. Dennis.

It fixed the problem related to USB to UART converter.

SajK

 

0 Kudos
Message 7 of 7
(2,653 Views)