07-07-2011 01:58 AM
Hi All ,
Does any onw know if i'm setting in Daq device AI channel with X samples to read , is there any option to see whats the AI maximum rate with this parameter ( X ) ?
for example setting 200 points will give 25000 Samples per channel per sec
and 300 points will give 20000 Samples per channel per sec
Is there any function that can retrive that info or i need to calc it on my own ?
Solved! Go to Solution.
07-07-2011 02:43 AM
I don't understand your question: acquisition rate is not related to the number of samples acquired, it can be set to whichever value you want for your task (within hardwar limits of your DAQ device, of course) in 'rate' parameter of DAQmxCfgSampClkTiming () function.
Can you detail a little more your acquisition task? Also, which type of daq functions are you using?
07-07-2011 03:17 AM
Hi Roberto,
DAQmxErrChk (DAQmxCfgSampClkTiming(gAItaskHandle,"",AIrate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,sampsToRead));
This is the function I use , and I'm using DAQmxRegisterEveryNSamplesEvent to acquire my samps simultaneously in 5 AI channels.
As for your answer if I'm understanding it you are saying it's no matter if I'm getting 300 or 3000 points from the AI , I can set the rate to the maximum rate supported by my device ?
07-07-2011 05:01 AM - edited 07-07-2011 05:04 AM
Yes, that's it!
Sample rate and number of samples are not mutually related: you can have a long but slow acquisition or a short and fast one that acquire the same number of samples, the same as you can set your board to acquire indefinitely at a given sample rate. Setting the appropriate sample rate for your needs is part of the design process of your application.
Sample rate and number of samples determine how many samples your daq board will supply: you must provide a way to handle all those samples. Raising the sample rate will determine a faster trigger of EveryNSampleEvent
07-07-2011 06:10 AM
OK thanks , is there an option to get from a specific device it's maximum ai rate ? or i need to set it by the device datasheet ?
07-07-2011 08:20 AM
DAQmxGetDeviceAttribute () returns a lot of informations on a specific device; among others, it gives you the following values related to AI tasks
It is a powerful function you may want to study since it can offer you useful informations about your device.
07-07-2011 08:46 AM
Thanks it's a greate solution to my problem