Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution

Hello,

 

We are using a PCI-6115 in continuous acquisition mode at 10MHz.

 

We read the samples by blocks of 10e7 samples (i.e., by blocks of one second). Before reading the samples using the VI "Daqmx Read Analog 2D I16 NChan NSamp", we test whether the samples are available using the property "Daqmx Read --> Status --> Available Samples per channel":

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

 

Unfortunately, we do not catch errors related to buffer overflows. I mean, I made tests. And, when a buffer overflow occurs, instead of getting an error related to a buffer overflow, the property "Daqmx Read --> Status --> Available Samples per channel" simply returns 0 indefinitly.

 

This behavior is not what we want. We want something robust to detect buffer overflows. Is there a VI or a property to check whether a buffer overflow occured?

Instead of testing ourselves whether the samples are available, is it better to let the VI "Daqmx Read Analog 2D I16 NChan NSamp" do that with timeout=-1 directly?

 

Thank you,

Kind regards.

0 Kudos
Message 1 of 3
(2,946 Views)
Solution
Accepted by topic author xred

xred,

 

I don't have the hardware necessary to test this at the moment, but I think DAQmx Is Task Done.vi will do what you want.  The issue with using the Available Samples per Channel property is that it is valid to call this when the task is technically done (error, or after acquisition of all samples in a finite task) to determine how many samples can be read.  Since the error you have is a buffer overflow, there are no samples that can be safely read, so the query returns 0.  In your error case, I would expect that DAQmx Is Task Done.vi would return True for "task done?" output, and the error code you were expected from the "error out" output.

 

Hope this helps,
Dan

0 Kudos
Message 2 of 3
(2,939 Views)

Dear McDan,

 

Thank you for your solution.

It works!

 

Kind regards.

0 Kudos
Message 3 of 3
(2,922 Views)