01-16-2009 02:36 PM
In Traditional NIDAQ, I could use an external timebase for AI, where the timebase frequency was a multiple of my desired sampling rate, and then use SCAN_Start's "scanInterval" parameter to specify the divisor. For example, with an 80 kHz external timebase, a scanInterval value of 2 gave me a 40 kHz sampling rate (or in Traditional terminology, "scan rate") per channel. I see how in DAQmx, the DAQmxCfgSampClkTiming function is used to specify a timing source and rate, but how do I indicate the divisor between the external timebase frequency and the desired scan rate?
Thanks,
Larry
Solved! Go to Solution.
01-16-2009 02:38 PM
01-20-2009 10:13 AM
Hi Larry X,
In DAQmx you can also use the Timebase Divisor. When using the DAQmxCfgSampClkTiming you have the option to specify the Sampling rate. This has a similar effect than specifying the Timebase Divisor. If you need to, you can get/set/reset the Timebase Divisor using the DAQmxGetSampClkTimebaseDiv, DAQmxSetSampClkTimebaseDiv, DAQmxResetSampClkTimebaseDiv. Following I’m copying part of the NI-DAQmx C Reference Help about the Timebase Divisor property: "Setting this property has a similar effect to setting Rate. Use Rate when you know the rate of the Sample Clock Timebase and you want to acquire or generate samples at the specified rate. Use this property when you have an external timebase that you want to divide down and use as the Sample Clock, but you do not know rate of the external timebase." I hope this is helpful, please post back if that is not the case.