Fixed-Point Blockset    
Counter Limited

Count up and wrap back to zero after outputting the specified upper limit

Library

Sources

Description

The Counter Limited block is a masked block that counts up until the specified upper limit is reached. Then the counter wraps back to zero, and restarts counting up. The counter is always initialized to zero.

You can specify the upper limit with the Upper limit parameter.

You can specify the sample time with the Sample time parameter. A Sample time of -1 means that the sample time is inherited.

The output is an unsigned integer of 8, 16, or 32 bits, with the smallest number of bits needed to represent the upper limit.

Parameters and Dialog Box

Upper limit
Upper limit.
Sample time
Sample time.

Characteristics

Output Port
Unscaled integer or a floating-point data type
Scalar Expansion
No
Vectorized
No

See Also

Counter Free


  Counter Free Data Type Duplicate