Edge Counting

NI-DAQmx 18.6 Help

Edition Date: January 2019
Part Number: 370466AH-01
View Product Info

DOWNLOAD (Windows Only)

NI-DAQmx 18.6 Help
NI-DAQmx 19.0 Help

Edge counting is when a device counts rising or falling edges using a counter channel. You can choose to do either single point or buffered sample clock edge counting.

The following figure shows an example of edge counting in which the counter in a device counts five edges on the input terminal.

With buffered edge counting, the device latches the number of edges counted onto each active edge of the sample clock and stores the number in the buffer. There is no built-in clock for buffered edge counting, so you must supply an external sample clock.

In NI-DAQmx, when doing on-demand edge counting, you first arm the counter by calling the Start function/VI. Each subsequent read returns the number of edges counted since the counter was started. If you perform multiple reads without first starting the counter, the counter implicitly starts and stops with each Read function/VI call, and the number of counted edges is not cumulative between read calls.

On devices that support gate configuration along with timing engine pause triggering, use the CI.CountEdges.Gate.Enable attribute/property to enable gate functionality.

With the exception of the NI 9361, you also can pause counting with on-demand edge counting in NI-DAQmx by configuring a pause trigger. To configure a pause trigger, use the trigger attributes/properties to set the source terminal of the digital trigger as well as the level on which to pause.

Making Signal Connections

Creating a Program



Not Helpful