Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sometimes FindResources("ASRL?*INSTR") never returns

I an debugging a C# application where I use

NationalInstruments.VisaNS.ResourceManager.FindResources("ASRL?*INSTR") to find the list of instruments connected to my COM ports. This has worked fine for several years but now, sometimes when I run my application from within Visual Studio (2010), after having halted and recompiled my application, this call will never return. (I have code in destructors for calling Session.Dispose() to release the COM ports properly)

 

I then have to restart the computer to proceed with my debugging. This is off course quite annoying.

 

Drivers: NI Serial 3.9, Visa 5.2.0

OS: Windows XP service pack 3

Computer Dell Optiplex 755 

 

Regards @nders

0 Kudos
Message 1 of 2
(4,111 Views)

I know this thread is from 4 years ago but I am experiencing exactly the same issues. My application is calling the FindRsrc in COM-Visa looking for GPIB and USB devices only. The call never returns so the application is deadlocked. At this same point if I run VisaInteractive it will hang also. I can't even kill the application in the task manager.

 

Now my observation is slightly different in that I have a laptop and this seems to happen after undocking it, taking it home and then redocking the next day. If I run Visa Interactive it will hang and need to be rebooted to work again. I first noticed this with Visa 15.?? but am now using Visa 16.0 and it has the same issue.

 

My guess would be that one of the 15 million services that NI Visa installs is hanging when laptop gets un-docked/sleeps and gets re-docked. So I went to the services manager and stopped all the NI services and restarted them and it started working.

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