peekdata - really latest samples? - buffer?
2 views (last 30 days)
Show older comments
Hello, I'm using an mcc FS1608 AD-Converter to sample analog data input with the DataAcquisitionToolbox and Matlab2011. (Windows XP).
The sample rate is set to 1000 Channels: 6
In a while loop I used peekdata(AI,1) to look at the latest samples acquired. This while loop acquires nearly 2000 peeks per second (which is for sure influenced by the CPU speed). If I add each of these samples to a vector an plot this, one can clearly see, that the data is "grouped": The values are equal for around 110-130 samples (60-70ms), followed by another 110-130 samples (60-70ms) block of (other) equal values and so on.
The engine seems to transfer the data in blocks. As long as the latest block is not filled up yet (which takes around 60-70ms), peekdata takes the latest sample from the second last block.
Is my theory correct? Can I minimize the size of this block in order to peek at the truly latest samples?
Thank you very much for your help!
Eric
0 Comments
Answers (1)
Chirag Gupta
on 16 Aug 2011
I believe the theory is correct. You might be able to control this using the BufferingConfig and BufferingMode properties.
0 Comments
See Also
Categories
Find more on Schedule Model Components in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!