Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Error code -200279

 

I am getting the "Error code: -200279. Attempted to read samples that are no longer available..."
I have already referred to the information available on this error (Possible solutions being increasing buffer size, fetching data more frequently). 
Possible reasons for error: I am doing a continuous data acquisition of 8 channels at 48KHz. I am processing and displaying the acquired signal using plots. All these operations required considerable amount of speed. I am using a Window XP along with DAQ system. As Windows XP is not a real-time operating system and there might be an unknown delay, before a callback to acquire signal is called.
This error happened very frequently earlier but after increasing the buffer size it reduced a lot(once in 5 min). But it still happens.
Is there any way I can recover from this error ? I want to continue with the acquisiton even after this error happens, it is possible ?

Is there any way to increase the priority of thread which does the acquisition ?

 

0 Kudos
Message 1 of 4
(10,690 Views)

Hello Buddy,

I think, you can resolve this problem by connecting "-1" to the timeout of DAQmx Read function and reducing the" no. of samples per channels" in the same fuction.

Even if it is not resolved, then send me your code to help you more in this matter.

 

0 Kudos
Message 2 of 4
(10,673 Views)

The DAQmx driver uses a buffer of finite size to store samples acquired by a device. This buffer is filled up as samples are received from the device, and emptied when the samples are read by a user. If samples from the device fill up the buffer, because the user isn't reading fast enough, you will get error -200279. Now, to answer your questions --

 

Is there any way I can recover from this error ? I want to continue with the acquisition even after this error happens, it is possible ?

 

You can completely avoid this error by setting DAQmx Read property node > Overwrite Mode to the 'Overwrite Unread Samples'. This will prevent an error from being returned when the DAQmx buffer fills up and samples get overwritten, which means you will have no indication when samples are overwritten. This is not entirely desirable, as you will have discontinuities in the data read.

 

On the other hand, if you leave the error enabled and eventually get the error, you can check if the error code returned is -200279 and then delete the error through the DAQmx Clear Error VI or something such. This will let you continue, albeit by masking the error.

 

Is there any way to increase the priority of thread which does the acquisition ?

 

I doubt that increasing the priority of the thread will solve the problem in a reliable way. Besides increasing the size of the buffer, you could look into optimizing the read loop to execute faster. An example of using a producer-consumer pattern to make a lightweight read loop is available here -- http://decibel.ni.com/content/docs/DOC-2431

 

Hope this helps.

 

 

 

 

Message 3 of 4
(10,331 Views)

Hi,

 

Years later, it seems that the answer hasn't be found.

You have to reset the date sample, otherwise, it will generate always the same error.

Here is my code (in French, quickly made) to reset the task :

Resolution Overflow.PNG

 

Best Regards

0 Kudos
Message 4 of 4
(7,795 Views)