Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

TCPIPSession has no ControlRen method, need to put instrument in local mode (remotely)

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?

 

0 Kudos
Message 1 of 4
(3,668 Views)

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,

James W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,646 Views)

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?

0 Kudos
Message 3 of 4
(3,616 Views)

What is the instrument that you are connecting to?

Ian M.
National Instruments
0 Kudos
Message 4 of 4
(3,595 Views)