| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Sources

The Counter Limited block 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.
The Counter Limited block outputs an unsigned integer.

Upper limit.
Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See How to Specify the Sample Time.
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | No |
![]() | Counter Free-Running | Data Store Memory | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |