LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP how to receive more than 548bytes

Solved!
Go to solution

Hello,

 

I have a problem with receiving data over UDP from sensor. Sensor is sending me 752bytes, and because of max. size for UDPread.vi I get the error "A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram was smaller than the datagram itself."

 

I also can't limited or buffered somehow number of bytes that sensor is sending me, so I need to receive this 752bytes at once.

 

Is there any other solutions for reading more than 548bytes in LV with UDP?

 

Maybe some DLL with UDP receiver?

 

 

Thanks for any help...

 

0 Kudos
Message 1 of 3
(8,809 Views)
Solution
Accepted by topic author Miroslav Savić

@Miroslav Savić wrote:

Hello,

 

I have a problem with receiving data over UDP from sensor. Sensor is sending me 752bytes, and because of max. size for UDPread.vi I get the error "A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram was smaller than the datagram itself."

 

I also can't limited or buffered somehow number of bytes that sensor is sending me, so I need to receive this 752bytes at once.

 

Is there any other solutions for reading more than 548bytes in LV with UDP?

 

I may be wrong but nothing in the help to UDP Read indicates that you could not wire a larger constant than 548 to the "max size" parameter. The help text specifically mentions (emphasis partially mine):

 

max size is the maximum number of bytes to read. The default is 548. (Windows) If you wire a value other than 548 to this input, Windows might return an error because the function cannot read fewer bytes than are in a packet.

 

So it's an indication of how many bytes to return in maximum. And on Windows if you wire something else than 548 you could possibly receive an error since if the actually received data packet is larger than the specified number of bytes to return, Windows will treat this as an error.

 

Rolf Kalbermatter
My Blog
Message 2 of 3
(8,709 Views)

Set the max size to 65507.

0 Kudos
Message 3 of 3
(7,958 Views)