Dear LV User Community,
I am a new user drawing an application to send a histogram from one PC to another over a private network, where other network traffic will be minimal. The complete histogram will be sent periodically, so it is acceptable if a small number of them are missed. I chose to use UDP because we would like to send these results rather fast to keep up with a different Data Collection and Reduction VI.
The Server chops up the 147,464 byte flattened histogram string into 548 byte segments and sends them to the Client whenever the Number of Counts changes. Note that 147,464 / 548 = 269.09, not an integer, so the last segment will be less than 548 bytes.
The Client can choose to Receive or Ignore any data coming from the Server.
My questions are:
1. Can I send greater than 548 byte segments over the ethernet? I see on the UDP Read VI help, the default is 548 bytes, and any less may cause an error. The UDP Write VI help states in an Ethernet environment, restrict data to 8192 bytes. When I tried to send 7672 byte segments (<8192 bytes, but still a multiple of 548 bytes), the client VI gave an Error #56 (timeout) when the Broadcast BOOLEAN was set. What is the best segment size to use to send this data quickly and efficiently (both point to point, and broadcast), with minimal errors?
2. There is an odd Error #56 (Timeout error) that occurs in the Client when I switch the Receive Histogram BOOLEAN in the Client from the "Ignore" to "Receive" state, then send data with the Server. If I understand correctly, the operating system buffers the packets if there is no UDP read, but when I do go from the "Ignore" to the "Receive" state, why is there always a Timeout Error, and how can I fix this?
3. Can anyone suggest ways to improve these VI?
Thank you for your advice,
-Dan M.