Why Do USRP Tx Examples Take So Long to End after Clicking Stop?

Updated May 3, 2018

Reported In


  • NI-USRP 16.1
  • NI-USRP 17.0
  • NI-USRP 17.5


Missing Attachment

Issue Details

When running NI-USRP Tx examples, I find they take a long time to end after clicking the Stop button. Why is this?


This is expected behavior, however, there are two ways to work around this behavior:
  • Run at a higher IQ rate. This empties the buffer more quickly, so the wait time becomes less noticeable above 10 MS/s.
  • Modify the Block Diagram of the example program to delete the wire connected to the end of data? parameter on the Write Tx Data VI. Unmodified, this wire connects the Stop Boolean control to this input. By deleting the wire, the input defaults to FALSE which means the buffer will be flushed immediately when the Tx session is closed rather than waiting for all samples to be transmitted. This means that potentially not all data sent via the Write Tx Data VI will actually be transmitted from the device. The figure below highlights this wire in the niUSRP EX Tx Continuous Async example, but can be applied to many of the Tx examples.

For more information on the end of data? parameter, see the Related Links below.

Additional Information

With the release of NI-USRP 16.1, the internal Tx buffer increased from 200 kB to 32 MB. When transmitting at lower IQ rates, it can take some time for this buffer to empty, which causes the program to wait until this buffer is cleared. There is no way to change the size of the buffer, thus the workarounds provided are the best methods to avoid this behavior.


Not Helpful