Simulink Reference Previous page   Next Page
Counter Free-Running

Count up and overflow back to zero after the maximum value possible is reached for the specified number of bits

Library

Sources

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

Number of Bits
Specified number of bits.
Sample time
Specify the time interval between samples. To inherit the sample time, set this parameter to -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

Counter Limited


Previous page  Coulomb and Viscous Friction Counter Limited Next page

© 1994-2005 The MathWorks, Inc.