PCI-6115: no error is raised when a buffer overrun occurs

Hello

We use a PCI-6115 continuous acquisition to 10 MHz mode.

We read samples in blocks of 10e7 samples (i.e., by blocks of a second). Before you read the samples using the 'Daqmx Read analog 2D I16 NChan NSamp' VI, we check if the samples are available using the property "Daqmx Read--> status--> samples available by channel":

  • If 10e7 samples are available, we call the 'Daqmx Read analog 2D I16 NChan NSamp' VI with timeout =-1.
  • If not, we wait a few milliseconds and retry.

Unfortunately, we didn't intercept errors related to buffer overflows. I mean, I did some tests. And when a buffer overrun occurs, instead of getting an error related to a buffer overrun, the property "Daqmx Read--> status--> samples available through" simply returns 0 indefinitely.

This behavior is not what we want. We want something solid to detect buffer overruns. Is there a VI or property to check if a buffer overflow has occurred?

Instead of testing ourselves if samples are available, is it best to let the 'Daqmx Read analog 2D I16 NChan NSamp' VI do with timeout =-1 directly?

Thank you

Kind regards.

xRed,

I don't have the equipment to test this at the moment, but I think DAQmx's task Done.vi go do what you want.  The problem with the help of samples available by channel property is that it is valid to call it when the task is technically done (error, or after the acquisition of all of the samples in a task finished) to determine how many samples can be read.  As the error you have is a buffer overrun, there is no samples that can be read safely, the query returns 0.  In your case of error, I expect that DAQmx is task Done.vi would return True for 'task performed?' output and the error you code were expected since the release of "error".

Hope this helps,
Dan

Tags: NI Hardware

Similar Questions

Maybe you are looking for