Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

detect invalid visa resources

I have an application where I need to continuously check for available serial ports, attached/ removed USB to serial adapters.

A list of ports are presented to the user for selection of which interface to use. Since the COM number is not really useful when it comes to USB-adapters I present the devics as

Most of the installations this is no problem.

VISA find resource comes up with a list and I read the "Interface Description" to get adapter type and serial number, whis is presented to the user.

 

Unfortunately thera are some resources in the resource list that are not really serial adapters which can be accessed by VISA (typically Bluetooth devices).

Any access to these maks the application to hang for a 5-10 seconds and ends up with error (Hex 0xBFFF0000) Unknown system error (miscellaneous error).

 

Is there any method to detect such resources without the 10 second timeout?

 

PS Checking if VISA session is valid is unfortunatly no answer since you have to try to access it a last once before it becomes valid.

DS

0 Kudos
Message 1 of 1
(3,035 Views)