Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to unlock the resource if it is locked with error code BFFF000FF

Hi,

 

I am using NI Visa library (NI Visa version4.6.2) for my applicaiton which written in C#.

Sometimes, the program might catch below error by using the exception handling function that halted my program. 

At this point, the VISA Sessions are still open and locked.
 

NationalInstruments.VisaNS.VisaException: Specified type of lock cannot be obtained, or specified operation cannot be performed, because the resource is locked. VISA error code -1073807345 (0xBFFF000F), ErrorResourceLocked

 

So, is there a way for me to programmatically unlock or close all VISA sessions on my machine, without knowing the handles

to the sessions in advance?

 

Thanks,

aiheong

0 Kudos
Message 1 of 1
(4,445 Views)