Counter Mode and Sampling Mode

Functions provided by the API-CNT(WDM) driver include the counter mode functions for use as a normal counter board,
and the sampling mode functions that performs periodic sampling with a clock using the sampling function.

Different devices have different functions. For details, please refer to the counter type specifications.


Common Processing

It is necessary to perform initialization and exit processing for not only counter mode but also sampling mode.
After initialization processing, every function can be used until exit processing is executed.

Counter Mode

In counter mode, it performs usual counter operation of setting counter operation condition first, then starting the counter and reading the count value and the status.

Sampling Mode

In sampling mode, it performs operation of setting counter operation condition and setting sampling operation condition, then starting sampling after starting the counter, and acquiring the count value change as sampling data.


It is possible to use counter mode and sampling mode at the same time.
Therefore, the current count value can be confirmed while sampling.

For the processing procedure, please refer to the flow chart for counter mode and sampling mode,
or the source code of sample programs.

Please refer to Function Reference for details of each used function and setting method.