LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data lost with TCP connexion (and big data)

Solved!
Go to solution

Hello,

 

I am working on a project on which I have to transfer data from LabVIEW to Python. So Python create the server and launch the VI in two threads, and LabVIEW is the client which send data.

With the current VI, I can send data of a 100*100 table correctly, that is to say each message received in Python contained the entire message, the beginning is the size of the message, and the following the message itself.

 

But, as soon as I use bigger table (120*120 for example), I don't receive anymore the entire message. It is like this I am at the maximum size of the buffer of the TCP connexion. Is there a maximum size? If yes, do you know it?

 

Anybody can help me to understand why I am losing data juste changing the size of the table used ?

Thank you in advance

 

Vi.png

 

PS: I put the python file but you don't need to look at it. the problem is really in the VI I think.

Mathieu Gauquelin
Download All
0 Kudos
Message 1 of 5
(3,127 Views)

Don't start a new topic on the same subject.  Stick to the old one here.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 5
(3,104 Views)

Billko,

     Thanks for pointing out that the question was, in fact, answered earlier today in another post.  I'm guessing that possibly there is a language problem, and perhaps the original Poster didn't understand the response that suggested that the Original Poster was trying to send too much data in a single packet.  A quick Web search suggests that the maximum size for a TCP/IP packet is 65535 bytes, but suggests that much smaller packets (less than 10KB) be used.

 

Bob Schor

0 Kudos
Message 3 of 5
(3,078 Views)

There is no link between packet size and the size of the data you pass to the write primitive, at least none I am aware of. The TCP functions package up and transmit the data in whatever sizes make sense (or more likely, whatever sizes the OS takes). 

0 Kudos
Message 4 of 5
(3,057 Views)
Solution
Accepted by topic author Mathieu33800

I see a lot of people visited my page. The solution is on my other post (send after flattening into string and by pieces :

https://forums.ni.com/t5/LabVIEW/Send-big-data-via-network-communication/m-p/3687979#M1037030

Mathieu Gauquelin
0 Kudos
Message 5 of 5
(2,840 Views)