Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Maintaining a continuous VXI-11 connection over TCP/IP to a device over a long term period

Solved!
Go to solution

Hi,

 

Is there anyone managing to maintain a continuous VXI-11 connection from Matlab to a device connected using TCP/IP over periods from several days to weeks? During the time, the device would be handling almost continuous SCPI commands and would be sending information back to Matlab just fine also?

 

I'm using Matlab 7.40 with the instrument control toolbox, NI-VISA 460 runtime, and an Anritsu device with a 10BASE-T Ethernet interface. After approximately 24 hours of continuous SCPI command handling, I get the error "VISA: The protocol specified is invalid".

 

A workaround is to send a SCPI reset command to reboot the device and begin again. The network and power systems are fine; not the problem here. If this isn't a known issue, perhaps the problem is on the device side.

 

Any feedback/insights would be very welcome

 

Thanks

0 Kudos
Message 1 of 3
(5,125 Views)
Solution
Accepted by topic author mrg32

Are you using DHCP or static IP? Normal DHCP leases are renewed every 24 hours and who knows what the instrument is going to do during this period - reset the link maybe!

 

Message 2 of 3
(5,101 Views)
Hi! That is an embarrassingly simple and logical reason for this behavour. I overlooked that. Yes, although the IP address is tied to the MAC address, it is DHCP and the lease time is 48 hours. However, the lease expiry times for the both the host device and the client machine connected to it (also DHCP) are not in sync so a reconnect is needed about every 24 hours. Thanks so much!
0 Kudos
Message 3 of 3
(5,093 Views)