Fixed-Point Blockset | ![]() ![]() |
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 block is a masked block that 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 the global doubles override is selected, the Counter Free does not wrap back to zero.
Parameters and Dialog Box
Characteristics
Output Port |
Unscaled integer or a floating-point data type |
Scalar Expansion |
No |
Vectorized |
No |
![]() | Cosine | Counter Limited | ![]() |