| Simulink Reference | ![]() |
Count up and overflow back to zero after the maximum value possible is reached for the specified number of bits
Library
Description
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.
Data Type Support
The Counter Free-Running block accepts signals of any data type supported by Simulink, including fixed-point data types.
Parameters and Dialog Box
-1. See Specifying Sample Time in the online documentation for more information.
Characteristics
| Sample Time |
Specified in the Sample time parameter |
| Scalar Expansion |
No |
See Also
| Coulomb and Viscous Friction | Counter Limited | ![]() |
© 1994-2005 The MathWorks, Inc.