| Simulink® | ![]() |
Count up and overflow back to zero after maximum value possible is reached for specified number of bits
Sources

The Counter Free-Running block counts up until the maximum possible value, 2Nbits - 1, is reached, where Nbits is the number of bits. Then the counter overflows to zero, and restarts counting up. The counter is always initialized to zero.
You can specify the number of bits with the Number of Bits parameter.
You can specify the sample time with the Sample time parameter.
The output is an unsigned integer. If you select the global doubles override, the Counter Free-Running block does not wrap back to zero.
The Counter Free-Running block outputs an unsigned integer.

Specified number of bits.
Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See Specifying Sample Time.
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | No |
![]() | Coulomb and Viscous Friction | Counter Limited | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |