Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I query a serial com port to determine if it is already open?

Solved!
Go to solution
I would like to query a COM port to see if it has already been opened by another program and select a different Com port if the original choice was already opened.
0 Kudos
Message 1 of 3
(3,645 Views)
Solution
Accepted by topic author Tri_State_Port

What language and api are you using? With LabVIEW and VISA, when you open a port and it's in use, you will get a specific error (I don't remember the exact error code). Look for this error code.

 

The VISA error is -1073807246

Message Edited by Dennis Knutson on 05-01-2009 09:47 AM
Message 2 of 3
(3,643 Views)
You hit the nail on the head with LabView and VISA.  Thanks for the help!
0 Kudos
Message 3 of 3
(3,633 Views)