To set counter operation mode for sampling, it is almost same as used in counter mode.
Please refer to "Counter Operation Mode Setting" for details.
Compared with counter mode, the difference in sampling mode setting is that totalizing counter mode and line receiver counter mode is added to the counter operation mode. (the function of CntSetCounterMode)
Totalizing counter mode
The counter works as a usual UP/DOWN counter.
Line receiver counter mode
The difference from the last count value is used as sampling data.
The frequency can be measured by using this mode for sampling at a certain period.