Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

"Attempted to read samples that are no longer avaiable"

Hi,
 
I am using NI-PCI6281 and Labview 8.0 on Windows XP.
I use the DAQ Assistant to sample two channels at 200k rate and "continously" mode.. I got the following error message:
 
"Attempted to read samples that are no longer avaiable. The requested sample was previously avaiable but has since been overwritten."
 
It looks like that if I sample these two channels at 20k. It is ok.
 
What I need to do to make this work at 200k sampling rate?
 
 
0 Kudos
Message 1 of 7
(2,427 Views)

You probably just need to read more often, or read more samples at a time.  So, if you have a wait in your loop, decrease the wait time.  Or increase your "Number of Samples" input to the DAQ Assistant (or perhaps, both).
-Alan A.

Message Edited by Alan [DE] on 03-06-2006 10:36 AM

0 Kudos
Message 2 of 7
(2,426 Views)

Thanks.

I increased the input buffer and did not get the error message any more.

I also save the data into a file and display the waveform in a wavegraph in real time. I saw there are some gaps with no points there in the wavegraph. It apears periodically. I am wondering wether there are some data that failed to be read from the DAQ board or just because the wavegraph failed to display the data?

 

 

 

 

 

0 Kudos
Message 3 of 7
(2,418 Views)
NI-DAQmx will return an error if you miss any data points.  What do you mean by 'gaps' in the graph?  Could you post some screen shots?  Also, it might help to post your code as well.
-Alan A.
0 Kudos
Message 4 of 7
(2,418 Views)
Here is the waveform picture with gaps and the code.(in the attachment)
 
Thanks.
 
 
Download All
0 Kudos
Message 5 of 7
(2,409 Views)
Well, I'm not exactly sure what is going on.  I can't reproduce the issue you are seeing with your code.  I can tell you that I prefer using Waveform Graphs, as opposed to Waveform Charts (personal preference, because I apparently don't know all the caveats of using charts 😞 ).  I can suggest a couple things.  First, you are creating and stopping the analog output task inside your while loop.  This creates unnecessary processing/overhead.  You should create and stop the task outside the loop.  Also, you might want to try reading a set number of samples every iteration.  As you have it now (-1 for number of samples to read) you could be reading anywhere from 1 to X samples per iteration (where X is some large number, dependent on your buffer size).  This post might not be much help, but I can assure the issue lies with the plotting of data and not the data acquisition.  Because, again, NI-DAQmx will give you an error if you miss any data points.
0 Kudos
Message 6 of 7
(2,398 Views)

Thanks a lot!

 

0 Kudos
Message 7 of 7
(2,391 Views)