01-24-2013 12:52 PM
I noticed there is no ControlRen method in the TcpIpSession class as there is in both the GpibSession and UsbSession classes. In my application I need to tell the remoted instrument to "go to local", which I can do in the latter two classes. However, if the instrument is connected to the host via TCP/IP there is no way to do this that I can see.
Here is a snippet of code from my base class for communicating with the instruments:
The session_ variable is of type NationalInstruments.VisaNS.Session
public void goToLocal()
{
if (session_.GetType() == typeof(GpibSession)) ((GpibSession)session_).ControlRen(RenMode.AddressAndGtl);
else if (session_.GetType() == typeof(UsbSession)) ((UsbSession)session_).ControlRen(RenMode.AddressAndGtl);
else { /* do nothing, TcpIpSession does not have a "go to local" method */ }
}
Can anyone help with this?
01-25-2013 10:16 AM
Hi Randy_Leonardi,
The question I have right now is what sort of instrument are you communicating with in your application through the TCPIPSession? I ask because there is the possibility that the instruments that can be communicated with through TCPIP are not compatible with local/remote calls or possibly not specifically with our VISA communication. Looking through the documentation it appears we only support local/remote settings through GPIB and USB type sessions (at least within the VisaNS namespace).
Regards,
01-30-2013 06:16 AM
When I connect to my instrument using ResourceManager.GetLocalManager().Open(visaResourceName), it returns a TcpIpSession object.
When that happens, the instrument will remain in remote FOREVER unless I physically press the Local button on its front panel.
As you have seen in the docs, and I stated in the original, GpibSession and UsbSession allow you to command the instrument back to Local control. I need the same ability when connected via Ethernet. Even calling Session.Dispose() does not take the instrument out of remote.
Is there a way to do this?
01-31-2013 03:21 PM
What is the instrument that you are connecting to?