Using the Onboard Frequency Generator for Hardware-Timed Digital Tasks on M-Series DAQ Device

Updated Apr 27, 2023

Environment

Driver

  • NI-DAQmx

I do not have any available counters or analog clocks for hardware timed digital tasks on my M-Series Data Acquisition (DAQ) device. How can I use my onboard frequency generator to use as a sample clock for my digital I/O task?

To use the frequency generator as the sample clock for your digital task, complete the following steps:
  1. Create a counter output task that will generate a digital pulse train at the divided down rate of the frequency generator.
  2. Specify the channel name of the counter output task to be <NI-DAQmx Device Name>/freqout.
  3. Create a digital input task or digital output task and specify the source for the sample clock as /<NI-DAQmx Device Name>/FrequencyOutput.
  4. Start the digital input or digital output task.
  5. Start the frequency output task when you are ready for the digital task to start acquiring or generating.

Additional Information

Each M Series device has a frequency generator that produces a pulse train by dividing down the 10 MHz or 100 kHz onboard timebase by an integer divisor n = 1, 2, ..., 16. Using the onboard frequency generator limits the sample clock frequencies available to you but is a good option if you do not have an external clock available and are using all of the counters and analog clocks for other independent tasks.

For more information about the frequency generator, refer to page 7-23 of theĀ M Series User Manual.