Hi Haider,
Every sample you take will be based off of the clock signal that you
send it when reading multiple points. However, there are certain
limitations to the number of samples that you are reading. Let's
use the 5kS/s rate that you are talking about. If I set the
number of scans to read to 500 then it will wait for 500 samples to
occur and then pull those samples off of the buffer and read it into
your program. This operation will happen at a rate of 10 Hz
(5kSamples/s / 500 Samples = 10 Hz) and update your program.
However, if you try to read 1 or 2 samples at a time it means you will
update your application at a rate of 2.5-5 kHz, which is way beyond any
rates that the software can support.
Typically the rule of thumb (
link)
that I like to use is do not make your refresh rate be more than 10-20
times per second, and the fewer refreshes the smoother things tend to
go.
I think the real confusion here is where you set the buffer size.
That is essentially just how large of a buffer you have and you
typically want a buffer at least twice the size of what you are
reading. This helps to prevent buffer overruns and such.
I hope this helps to clear things up,