Output a Frequency Signal Without a Counter in NI-DAQmx

Updated Jul 30, 2018

Reported In

Hardware

  • Multifunction I/O Device

Driver

  • NI-DAQmx

Issue Details

  • I would like to output a frequency signal but I do not have a counter on my device.
  • What is the Frequency Output (FREQ OUT) signal and how do I program this signal using NI-DAQmx?

Solution

Note: If you have a counter resource available it is recommended to use the counter to generate a frequency waveform instead of using the freqout signal.

To create a frequency output signal without the use of a counter you can perform the following steps to program this signal in NI-DAQmx: 
  1. Configure a counter output task for frequency pulse generation, using the DAQmx Create Channel VI.
  2. Set the counter channel name input as <NI-DAQmx Device Name>/freqout and set the frequency input as the desired value of the divided down timebase. (To be able to view this channel, right-click on the control or constant and select I/O Name Filtering. In the dialog box that appears, place a checkmark next to Internal Channels and select OK.) 
  3. For an M or X Series device, the signal may be routed to any PFI or RTSI line by using the CO.Pulse.Term property node (DAQmx Channel Property»Counter Output»Pulse»Output Terminal).
  4. For an E Series device, the sample mode must be set to Continuous Samples using the SampQuant.SampMode property node (DAQmx Timing Property»Sample Quantity»Sample Mode).
  5. The task can be started and stopped the same way a counter output task would, using the DAQmx Start Task and DAQmx Stop Task VIs, respectively.

Additional Information

The Frequency Output (or FREQ OUT) signal is a digital pulse train that can be programmed on E, M and X Series devices without the use of any onboard counters. The signal uses the 10 MHz (the 20 MHz Timebase divided by 2) or 100 kHz Timebase, which can each be divided down by an integer divisor from 1 to 16. This gives the capability of producing one of 32 distinct digital pulse trains ranging from 6.25 kHz to 10 MHz.

By default, the Frequency Output signal will be generated on Pin 1 of the connector for E, M, and X Series devices. For E Series devices, Pin 1 is a dedicated pin for the FREQ OUT signal. On M and X Series devices, Pin 1 corresponds to PFI 14, but the FREQ OUT signal can be routed to any PFI or RTSI line, as well as the DO or DI Sample Clock. The Frequency Output signal may also be accessed internally by referencing /<NI-DAQmx Device Name>/FrequencyOutput.

You can find more information about the Frequency Output signal in the X Series User Manual and M Series User Manual under Counters»Counter Output Applications»Frequency Generation or in the E Series User Manual under Counters»Counter Timing Signals»Frequency Output Signal.

While the Frequency Output signal is useful when a counter is not available, it is recommended to use a counter when possible.  The Frequency Output has the following disadvantages when compared to the counters.  This list is not all inclusive.
 
  • As stated previously, the Frequency Output can only produce 32 distinct digital pulse trains.  Counters divide down the Timebase by an integer value to produce the pulse train.  The frequency of the pulse train must meet the following requirement: 
Timebase Rate / Counter Maximum Count <= Frequency <= Timebase Rate / 4 
 
The Counter Maximum Count is determined by the resolution of the counter.  See Related Links for more information.
 
  • When using the Frequency Output, you can only use either the internal 100 kHz Timebase or the 10 MHz Timebase.  When using counters, you can use any of the internal Timebase clocks or specify an external Timebase.
  • Frequency Output does not support triggering.
  • Counters support the following trigger types:
    • Arm Start Trigger
    • Start Trigger
    • Pause Trigger

WAS THIS ARTICLE HELPFUL?

Not Helpful