Count up and wrap back to zero after outputting specified upper limit
The Counter Limited block counts up until the specified upper limit is reached. Then the counter wraps back to zero, and restarts counting up. The counter always initializes to zero.
You can specify the upper limit with the Upper limit parameter.
You can specify the sample time with the Sample time parameter.
A Sample time of
that the sample time is inherited.
The output is an unsigned integer of 8, 16, or 32 bits, with the smallest number of bits needed to represent the upper limit.
The Counter Limited block outputs an unsigned integer.
For more information, see Data Types Supported by Simulink in the Simulink® documentation.
Specify the upper limit.
Specify the time interval between samples. To inherit the sample
time, set this parameter to
Specify Sample Time in
the Simulink documentation.
The following Simulink examples show how to use the Counter Limited block:
Specified in the Sample time parameter