LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Communication between LabWIndows CVI Server and LabVIEW Client

Hi everyone,

 

I'm facing an issue in using TCP for exchanging data between a LabWindows CVI server and LabVIEW client program, both running on different PC's connected directly via LAN. Basic setup of the program is as below.

 

  • LabWindows CVI registers a server and listens for connection from client.
  • LabVIEW client program connects to server program
  • Once the connection is established, sever(CVI) will continously send 16000 bytes (2000 double) plus 10 byte header which indicates size of data and few other parameters. so in total it is 16010 bytes/s. 
  • The header information are sent first, followed by data. both being send using seperate 'ServerTCPWrite' functions.
  • The client will read the packet size, read the data bytes and then decode data according to the header information.
  • In addition to above, the client sends 12 bytes/s to server.

Everything works as expected for about 20-30 minutes. But after that, at any time CVI server could throw up a timeout error (err -11) at ServerTCPWrite function. It has been observed that the this time is considerably reduced if server sends more amount of data per second. So i guessed it has something to do with underlying TCP buffers on either sides.

 

I came across this document from NI website.

http://digital.ni.com/public.nsf/allkb/A6ABC151D525C38586256B8400559CC5..

This mentions about increasing window size. But i'm not sure whether this has to be done for my application to work. In addition , i thought of monitoring the TCP transfers using Wireshark (a newtork sniffer) and observed that after 20 mins, TCP window size is reduced to zero. But it will still work for some more time before the sever timesout. 

 

tcp wireshark screenshot.png

 

I hope that i have provided enough details regarding the issue faced. Let me know if any further details are requred.

 

Best Regards

Deepu Jacob

 

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


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

Hi,

 

Has anyone faced any similar issue whle using TCP communication?

 

Best Regards

Deepu Jacob

 

 

 

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 2 of 3
(3,523 Views)

link to wire shark log file: https://drive.google.com/file/d/0B5qRLNgt2WANOW5weDlScTU4dlE/view?usp=sharing

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


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