Example Programs

Showing results for 
Search instead for 
Did you mean: 

Synchronizing the Frequency of Two Counters Using a Third Counter

Demonstrates a method of synchronizing the frequency of two counters by utilizing a third counter.

While it is relatively simple to align the rising edges of two counters by using a start trigger, it can become more complicated when a user wants to change the frequency or duty cycles of the counters on the fly.  

One way to accomplish this is to use a third counter as the source of ticks for the two counters, and then change the number of high ticks and low ticks of the two counters separately in order to change their duty cycles. This example allows two counters to generate a continuous pulse train, where the rising edges and frequency are aligned, but the duty cycle of the two pulses can differ and be changed on the fly.


  1. LabVIEW 2012 or compatible.
  2. NI-DAQmx 15.5.1 or compatible.
  3. DAQ device with at least 3 counters.


  1. Specify all control values on the front panel. For more information, click on Help >> Show Context Help and hover your pointer to the controls.
  2. Run this VI.


**This document has been updated to meet the current required format for the NI Code Exchange.**