Lost UDP Packets at Fast Transfer Rates Primary Software: LabVIEW Development Systems>>Base PackagePrimary Software Version: N/A Primary Software Fixed Version: N/A Secondary Software: LabVIEW Development Systems>>Full Development System Hardware: Instrument Connectivity Other>>Ethernet
Problem: When the UDP packets come in at high data rates (greater then 2Mb/s), they start getting lost, especially when the CPU gets loaded by other tasks. Solution: When the data rate of incoming UDP packets gets high enough, LabVIEW can't keep up with the UDP socket buffer. This problem only occurs when LabVIEW is moving the buffer into a queue or writing it to file. Therefore the solution is to increase the OS socket buffer size. This allows more time for LabVIEW to manipulate the buffer contents and perform the next buffer read before the incoming data overflows the socket buffer. The only way to set the OS socket buffer size is to make a call to setsockopt function in the wsock32.dll. Attached are VIs to automatically set and read back the buffer size on the defined socket connection, as well as an example VI using the buffer set/read VIs. A similar method can be used for TCP to increase the transfer rate. Related Links: Attachments:
Report Date: 06/22/2007 Last Updated: 07/18/2007 Document ID: 4AL9NF2L |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
