Clearing or Resetting a Full Analog Input Buffer

Updated Apr 5, 2023

Reported In

Hardware

  • USB-6343

Issue Details

I have an application that reads and saves data after a start button as long as it remains true. In between these measurement periods, the USB-6343 analog input buffers collects a lot of samples. Currently I have been using a read-all-available-samples to "dump" the buffer before using another read to collect current data. 

Is there a way to clear the USB-6343 analog input buffer which does not involve another read operation?

Solution

There is not a function to dump or clear the analog input buffer. 

However, the DAQmx Read Property Node will manually specify the point in the buffer in which to begin a read operation. By using the RelativeTo and Offset properties as in the example below, one can read the most recent 100 samples on the buffer.