11-30-2005 03:22 PM
11-30-2005 11:48 PM
Hi Wes,
From the first glance what i suggest is, do not use 'timed while loop' for continous DAQmx Read.
use normal while loop
regards
Dev
12-01-2005 09:27 AM
12-01-2005 11:21 PM
Wes, Its out of my personal experience i recomment this 😉
Its like this, Your DAQ mx read, retrives data from the buffer on each iteration .
If your sampling rate is 1000, number of samples to read is 100 and you have set your timed loop to execute for 100 millisec.
DAq mx read operation should ideally take 0.1 sec. but some times this operation may take 0.09 sec, some times 1.1 sec( to be more precise, i observerd this with higher sampling rates and while retrieving larger chunks of data from buffer)
Now your timed loop forces your DAq mx to read again after 100 m sec, and if your DAQ mx has not been able to retrieve all data from its previous loop, it give an error.
Whereas if you use a normal while loop, the loop control is with the DAQmx read and the next iteration happens only after DAQmx read finishes its current read operation.
12-02-2005 12:47 PM
12-02-2005 04:36 PM
12-04-2005 10:32 PM
Hi Otis,
Let me explain the reason why i suggested against the use of while loop.
Kindly suggest me if there is way to to get over this error i encountered.
"My application had all acq ranging from single card acq to a multi card sync acq with 5 E series DAQ cards on seperate windows as well as RT system.
They were working fine, but once i chaged it to timed loops, te application would run for something like 2 minutes and then give buffer errors.(both in windows as well as RT)
I tried all the possible settings for buffer size and retrival from buffer, but once i chaged back to normal while loop, all fell back to normal state."
This discussion may not be answering Wes's problem, but it might serve as a pointer nevertheless. 😉
So, Otis, plz do give your suggestion.
Regards
Dev
12-04-2005 11:43 PM
12-05-2005 12:02 AM
Hi Otis,
I have done all this checks/settings and only then, did i decide against using Timed While loops for acq.
And as i told you if this is the case, this period of the Timed Loop and period for the measurement mismatch should start reporting errors right after few iterations.
But as i explained, this error starts showing up only after an interval of say like 2-3 minutes or more.
Any thing else u suspect?
regards
Dev
12-05-2005 02:51 PM