Modulo counter (0 to N counter)
It is a discrete block. The block outputs a periodic scalar piecewise constant signal. Signal begin at Initial State value. The output is incremented when block received an event on its activation input until output reaches the Upper Limit parameter value. At this time the output is reset to 0. For a periodic event input, the output is a quantized sawtooth signal.
Output: scalar double.
Initial State
Scalar. Initial discrete state.
Properties : Type 'vec' of size 1
Upper Limit (positive number)
Scalar. Number of required step.
Properties : Type 'vec' of size 1
always active: no
direct-feedthrough: no
zero-crossing: no
mode: no
regular outputs:
- port 1 : size [1,1] / type 1
number/sizes of activation inputs: 1
number/sizes of activation outputs: 0
continuous-time state: no
discrete-time state: yes
object discrete-time state: no
name of computational function: modulo_count
SCI/modules/scicos_blocks/src/c/modulo_count.c (Type 4)