08-27-2008 10:08 PM
Dear All,
What is the advantage if I assign a sample size in both ConfigureSampleClock() & ReadMultiSample()?
What will be the total samples read?
Don't they have the same meaning? I am aware that this is a buffer for both APIs.
What happens if I use the ConfigureSampleClock() that has no sample size?
I am simply confused.
What am I missing?
For enlightenment,
A
08-28-2008 05:51 PM
Hi angelmcdoggie,
Both the sample size and sampling rate you specify in ConfigureSampleClock() will help determine the buffer size for your task. For finite acquisition/generation, the buffer size will be equal to the sample size you specify, whereas for continuous tasks, NI-DAQmx will choose a buffer size according to both parameters. More information on how the buffer sizes are determined can be found in the following document.
How Is the DAQmx Buffer Size Allocated for a Finite or Continuous Acquisition?
Now the sample size in ReadMultiSample() determines the number of samples to fetch per channel from your buffer (usually computer RAM) to your application memory every time this function is called. So you can see that while ConfigureSampleClock() determines the buffer size, ReadMultiSample() will determine your fetch size.
I hope this helps clear some of the confusion. Please let us know if you have more questions.