Counter Free-Running

Count up and overflow back to zero after maximum value possible is reached for 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 outputs an unsigned integer.

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.

Characteristics

Sample Time

Specified in the Sample time parameter

Scalar Expansion

No

See Also

Counter Limited

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS