Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Socket-based sessions getting lost

We are controlling a number of devices using VISA. One device is a switch (WebLogic) that is actually web-controlled. We are using GET requests to send commands and read XML response pages. I can open a VISA SOCKET session to the switch, then send a command and read the response. However, the next time I try to access it, the connection is lost and the viWrite() will give an error. I tried to set the VI_ATTR_TCPIP_KEEPALIVE attribute, but that didn't seem to help.

 

Our basic methodology for instrument control is to establish a VISA session at init time, and use that to handle all I/O requests until the instrument driver is shut down. In this case, losing the connection so soon is a problem. Why does the connection get lost, and is there anything we can do to make this look more like a standard GPIB or TCPIP INSTR device?

 

 

Brian

 

0 Kudos
Message 1 of 3
(3,052 Views)

Hello, Brian!

 

Could you attach a screenshot of the error you're seeing?

Will Hilzinger | Switch Product Support Engineer | National Instruments
0 Kudos
Message 2 of 3
(3,041 Views)

After further investigations, it appears as though the instrument we are working with is closing the socket on its end when it has finished sending a response.

 

 

Brian

 

0 Kudos
Message 3 of 3
(3,039 Views)