MATLAB: Do UDP packets get dropped when received at a high rate with Instrument Control Toolbox 2.4.2 (R2007a)

Instrument Control Toolbox

I am using Instrument Control Toolbox to receive data via UDP. The packets are arriving at a sustained rate greater than 500 packets per second. Approximately the first 1Mb of data is received without problems however after this, packets are dropped.

Best Answer

Instrument Control Toolbox was designed for communication with instruments, not for importing large amounts of streaming data. The UDP protocol does not guarantee reliability or ordering in the way that TCP does, therefore packets can be dropped.
Instrument Control Toolbox configures a 1Mb buffer at the OS level. This is independent from the InputBufferSize. Packets are buffered at this level until the Instrument Control Toolbox engine pulls them into the standard input buffer. If the engine is not able to keep up with the packet arrival speed and this 1Mb buffer becomes full, packets will be dropped.
The ability to configure this OS level buffer is not available in Instrument Control Toolbox. There are no workarounds.
The only way to prevent dropped packets would be to slow down the UDP packet rate or use a TCP connection.