Reading Available Samples on USB or Ethernet DAQ

Reading -1 or querying AvailableSamplesPerChannel sends a request to the device forcing it to flush any samples that may be sitting in the buffer.

When using USB or Ethernet DAQ devices, these samples may not reach your computer's buffer in time, resulting in an incorrect number of samples available being displayed. To ensure all samples get read, either use a second read also querying -1 (which will then contain the desired samples), or specify the number of samples to read so the device waits until the specified number of samples have entered the computer's buffer before returning the data.