02-01-2012 11:12 AM
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
02-02-2012 01:21 PM
Hello, Brian!
Could you attach a screenshot of the error you're seeing?
02-02-2012 01:24 PM
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