Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Can not connect instrument using TcpipSocket

$
0
0

Hi:

 

I have a RF switch connected to a remote PC (host PC) via ethernet connection. I need to control the RF switch from a client PC within the same subnet with the host PC. I am using NI Visa Server to establish the link between host and client PC.

 

First I tried using NI MAX explorer to try control from the client PC.

 

As you can see below, I can send query command to the RF switch.

 VisaTestPanel_FromClientPC.jpg

 

But when I click the Validate button on the NI MAX explorer, I received Visa error 0xBFFF0011 "Insufficient location information or the device or resource is not present in the system." 

ValidateFailed_FromClientPC.jpg

 

 

I am getting the same error when I tried to do it in C# 2005 using the below code. I tried both methods below all did not work:

this.session = new TcpipSocket(remoteAddress + "::" + address + "::" + port + "::sOCKET");

this.session = new TcpipSocket(remoteAddress + "::" + address + "::" + port + "::sOCKET",AccessModes.ExclusiveLock,10000,false);

the address argument is = VISA://192.168.135.203/TCPIP0::192.168.2.170::7::sOCKET

192.168.135.203 = IP address of host PC (TXPTEST43)

192.168.2.170 = static IP address of RF switch

The RF switch is connected to the host PC via a USB to LAN port adaptor on the host PC.

 

I have no problem to access the RF switch using C# 2005 if the RF switch is connected to the same PC. The address will become:

TCPIP0::192.168.2.170::7::sOCKET

 

Note: the S of the SOCKET I have to use small case, otherwise it will turn into a smiling icon

 

Any help is appreciated.

 

Thank you.

 

Chin Lin


Viewing all articles
Browse latest Browse all 5565

Trending Articles