Capturing Initial Counter Input Period on X Series DAQ

Updated Feb 25, 2026

Reported In

Driver

  • NI-DAQmx

Issue Details

I need to capture the initial or bad sample of the Counter Input (CI) period when using X Series devices. I know the hardware cannot natively record this first unstable period, but is there any workaround to accurately determine the initial CI period? The initial sample is shown in the image below:

 

 

Solution

You can work around this issue by using a CI Edge Count task instead of directly measuring the CI Period, then calculating the first period yourself.

Here’s how:

  • Set up a CI Edge Count task to monitor the incoming signal edges.
  • Use your device’s timebase - e.g., /Dev1/20MHzTimebase—as the sample clock.
  • From the captured data, find the index of the first falling edge.
  • Compute the initial period using: Initial Period = (Index of First Falling Edge) × (1 / 20 MHz)

Here’s the VI you can use to compute the initial CI period:

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.

This is an example of the resulting output.