There are 3 available modes: free run mode, time-based mode and pulse-based mode.
In "Free Run Mode" pulses are counted continuously. You can suspend, resume or reset the counter and get the number of pulses at any time.
In "Time-Based Mode" pulses are counted during the user-defined time period. When the predefined time period (limit) is exceeded, the counting starts again from 0. The pulse counter can send a match event to PC if activated. The event contains the number of pulses detected during this period.
In "Pulse-Based Mode" Pulses are counted until the number of pulses reaches the user-defined value (limit). Then the counting starts again from 0. The counter can send an event to PC if activated. The event contains time elapsed from the moment you started the counter.
Pulse counter module mode can be set or changes by calling DlnPlsCntSetMode() function. You can also retrieve the current mode by calling DlnPlsCntGetMode() function.
There are also constants available for each mode in the dln_pls_cnt.h
header file: DLN_PLS_CNT_MODE_FREE_RUN(0)
, DLN_PLS_CNT_MODE_TIME_BASED(1)
, DLN_PLS_CNT_MODE_PULSE_BASED(2)
.