08-15-2012 10:59 PM
When I set up a task to read a finite number of samples, I'd like to be able to read for 120 seconds at my selected rate. When I try to read for what would take longer than 10s (sample count > 10 * sample rate) I get an error.
I realize that I can run this task 12 consecutive times, but this is not preferred due to the overhead time loss in between each call to ReadMultiSample.
Thanks.
Solved! Go to Solution.
08-16-2012 07:10 AM
We need a lot more information in order to help. What sample rate are you using? What DAQ card? What is the error?
My guess (purely a guess) is that you are overrunning the DAQ buffer. My approach would be to use the Stream to TDMS and then post process the data.
08-16-2012 10:17 AM
And if you used continuous mode instead of finite samples, you can put the read in a loop with no loss of samples or the overhead you have with finite sample mode. Assuming of course you don't have much else going on in the loop.
08-16-2012 10:49 AM
If you are not explicitly setting the timeout input on the DAQmx read VI, it will default to a timeout of 10 seconds. If you want to do a single finite read, you should probably use your sample rate and your number of samples to compute a reasonable timeout for DAQmx read.
Dan
08-16-2012 06:23 PM
Wow. Fastest and most brute force response ever. I'll update the timeout duration and report back with my findings. Thanks!
08-19-2012 03:09 AM
This worked. Thanks!