Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding Open VISA Sessions (C#)

I have a question regarding active VISA sessions and how to determine them.

 

My understanding, via http://www.ni.com/support/visa/vintro.pdf , is that if a session is opened with an instrument but never closed, it begins to take up system resources. I also understand that I can use the FindReferences(string) command to find all the Resources in a system. What I don't know how to do is find the Sessions in a system. Is this possible?

 

For instance, let's say a session is opened in C++, but this program crashes. I'd like to be able to develop a C# program which can find this active session and close it. The link above seems to imply that LabVIEW is capable of finding open sessions and creating links to them, but I can't seem to determine how this is done in .NET.

 

For reference, I am using Visual Studio 2012, Measurement Studio 2013, the latest VisaNS DLL, and am targeting .NET Framework 4.5.

 

Thank you!

0 Kudos
Message 1 of 3
(6,120 Views)

Hi piercel

 

I have been looking for a function similar to the one that LabVIEW has, but unfortunately it seems that for C# there is not any function available to do this. You can also have a look to the VISA manual

 

Regards

Esteban R. 

0 Kudos
Message 2 of 3
(6,093 Views)

Hi,

 

I am facing the same issue here. Is there a way to list all the VISA Sessions that are open and close them in C# ?

 

regards,

 

Cedric.

0 Kudos
Message 3 of 3
(2,582 Views)