Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use an external timebase for AI, where the ext TB freq is a multiple of my desired scan rate? (DAQmx / C)

Solved!
Go to solution

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

 

0 Kudos
Message 1 of 3
(2,691 Views)
Please ignore the winking smiley in the above question -- I don't how that got in there!
0 Kudos
Message 2 of 3
(2,689 Views)
Solution
Accepted by topic author Larry X

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.

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(2,667 Views)