05-05-2006 08:30 AM
05-08-2006 04:39 PM
Nanopore,
That error officially means:
“Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.”
So what could be happening in your system is that you are collect samples faster (as you increase your sample rate) then you are pulling them out of the buffer. The “Rate” input determines your sample rate, and the “Samples to Read” determines how many samples you wait for to be in the buffer before you pull them out. One thing you may try is to reduce the “Samples to Read” value, that way you pull from the buffer more often and hopefully avoid this error.
Another thing you should try is to remove the writing to file from the while loop for now. What could be happening is the writing to file takes too long, and that is causing the buffer to overwrite itself. So for now just run the example program as is, with no file logging, and make sure it can run at the speeds you need. Then if that works, you will have determined that it’s the file IO that is bogging things down. Then you can look into more efficient ways of writing to a file (i.e. not using the express VI inside the while loop).
Give those things a shot, and let us know how it goes. Once we know where the problem is, we can offer advice as to where to go from there.
Hope this has helped.
05-09-2006 10:19 AM
05-09-2006 01:19 PM