Counter and Timer Input and Output

Acquire counter data and generate pulses with National Instruments® devices

Before you use counter channels, see Hardware Discovery and Session Setup.

To learn how to create a session and acquire or generate counter and timer data, see Counter and Timer Input and Output Workflow.


addCounterInputChannelAdd counter input channel
addCounterOutputChannelAdd counter output channel
inputSingleScanAcquire single scan from all input channels
resetCountersReset counter channel to initial count
startForegroundStart foreground operations
startBackgroundStart background operations
removeChannelRemove channel from session object
stopStop background operation
waitBlock MATLAB until background operation completes


expand all

ActiveEdgeRising or falling edges of EdgeCount signals
ActivePulseActive pulse measurement of PulseWidth counter channel
CountDirectionSpecify direction of counter channel
DeviceChannel device information
EncoderTypeEncoding type of counter channel
FrequencyFrequency of generated output
IDID of channel in session
InitialCountSpecify initial count point
MeasurementTypeChannel measurement type
NameSpecify descriptive name for the channel
TerminalPFI terminal of counter subsystem
ZResetConditionReset condition for Z-indexing
ZResetEnableEnable reset for Z-indexing
ZResetValueReset value for Z-indexing


Analog and Digital Counters

Use digital and analog counters to count clock and external events.

Acquire Counter Input Data

Acquires edge counts from a device.

Generate Pulse Data on a Counter Channel

Generates pulses on counter/timer device channels.

Acquire Digital Data Using a Counter Output Channel as External Clock

Acquire digital data using a counter output channel to generate clock pulses.

Featured Examples