LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send big data via network communication

Solved!
Go to solution

But it is weird because I have the good size, the good first value in the message but it cuts somewhere in the message sent. I will try to find the reason. Thanks.

Mathieu Gauquelin
0 Kudos
Message 11 of 14
(1,085 Views)
Solution
Accepted by topic author Mathieu33800

I generally break very large data into chunks when sending it over TCP. The largest chunk I generally use would be 65535. Simply put your TCP writes in a loop and send the data in pieces.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 12 of 14
(1,061 Views)

@Mark_Yedinak wrote:

I generally break very large data into chunks when sending it over TCP. The largest chunk I generally use would be 65535. Simply put your TCP writes in a loop and send the data in pieces.


To duplicate my post in OP's other thread, I'm not aware of any limitation with how much data a single TCP write function can send. The primitive or the OS is already going to break data apart for you into <1500 byte chunks.

However, if you put a timeout of 0 (as OP did), yes, you need to limit the size of your messages because you're asking it to never wait. What I personally do (if this sort of thing matters at all, which is pretty rare) is take the size of the data string and multiply it by expected transmit rate + overhead. So for example a cRIO would be 100 mbps, and I assume ~10 ms of overhead, and that gives me a timeout of X.

The other area where the 65k limit is correct is with UDP. UDP has a max packet size of 65k, so sending a packet bigger than that is impossible. Sending a packet bigger than a few MTUs is also not recommended, as each component of the packet is sent as an individual <1500 byte IP packet, and if any packet is lost the entire UDP packet is lost.

0 Kudos
Message 13 of 14
(1,041 Views)
Solution
Accepted by topic author Mathieu33800

It is working !!!!

 

I separate my data to send only a row at the time, and now I have no more problem.

 

I add my VI and python code to this post in future people have the same issue.

 

Vi.png

 

Again thank you all for your help and discussion.

Mathieu Gauquelin
Download All
0 Kudos
Message 14 of 14
(1,023 Views)