Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA causes application hang when ViClose is called

Good day,

 

I am running an NSI2000 script that calls in all the library files (as .dll's) for driving an FPGA used for DUT control. The script works great and runs flawlessly, but when I close out of the script, NSI2000 will hang and the best I can figure is it hangs once the ViClose command is executed (seen on NI Trace) to close my COM port and the FPGA session (through resource manager). Looking in Windows Event Viewer only displays "Application Hang". This same script has no issues closing the NSI2000 GUI on an older Windows XP machine, but with the new Windows 10 Machine, I'm now having this problem. 

 

Any help is greatly appreciated.

 

Thanks.

0 Kudos
Message 1 of 4
(133 Views)

What NI VISA version are you using on the Windows 10 computer? The old version that works for your XP computer is almost certainly not good enough for Windows 10.

 

Latest version of NI VISA that supported Windows XP SP3 was version 15.5. The oldest version of NI VISA that supported Windows 10 was version 15.0.1 but I would recommend at least 16.0.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(80 Views)

Hi Rolf,

 

On the Windows 10 computer, we have VISA version 20.0 installed. The script and source code work as expected in the NSI2000 GUI - it's only once I "close" the script that it causes the (NSI2000) application hang.

 

The best of my knowledge is it's happening when ViClose is called (i've even tried commenting out the .dll's in the source code and VISA manager still calls these commands) to terminate the RS-485 and FPGA session through the VISA resource manager. 

 

Another standalone application (executable GUI) that we use to control the DUT uses the same compiled source code and runs fine. When I close this application, there is no hang-up and ViClose is not called - so that's what leads me to believe that function is what's causing the issue.

0 Kudos
Message 3 of 4
(66 Views)

So you comment out the VISA calls and it still calls viClose()? That sounds very weird.

 

And another application calls VISA functions and does not hang?

 

What does that tell you?

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(64 Views)