07-07-2020 04:39 AM
Hi guys...!!!
My objective is to send a 2D Array of 16x100 coming from a NI-PXI hardware (Single precision float - 4 bytes each) [Total of 6400 bytes] through UDP in broadcast mode to multiple clients.
After running the Sender code in a PC-1, I'm able to receive the data in receiver code in the same PC-1. But when i run the receiver code in a different PC-2 (PC-1 & PC-2 are ofcourse in the same network), getting an Error - 56.
All VIs are attached.
Please help me guys.
Thank you
Solved! Go to Solution.
07-07-2020 06:34 AM
07-07-2020 11:13 PM
Hi GerdW,
Thanks for your response.
My program with multiple clients is running perfectly fine up to a byte size of 1472 bytes in UDP read.vi (no.of bytes setting). And stopped working with multiple clients after 1472 bytes.
Thank you
07-08-2020 12:10 AM - edited 07-08-2020 12:15 AM
Hi seshasai,
@seshasai94 wrote:
My program with multiple clients is running perfectly fine up to a byte size of 1472 bytes in UDP read.vi (no.of bytes setting). And stopped working with multiple clients after 1472 bytes.
So that's the limitiations of your current (local) network: don't use UDP messages with length of more than 1472 bytes!
(There's a reason the UDP function default to 548 bytes for UDP messages…)
When you need to send more data than fit into 1472 bytes you need to split the data into several messages.
Or you switch to TCP communication which handles most of this basic stuff on its own…
Btw. converting 16×100 SGL values into human-readable ASCII text is not needed for UDP communication. And it even increases the bandwidth needs as it increases the message size from 6400 bytes (16×100×4) to 16384 bytes (your arbitrary 16kB limit)…
Even the padding can be made a lot easier:
07-08-2020 03:49 AM
Hi GerdW,
Thanks for the suggestions..:)
Cheers man..!!!