Engee documentation

Counter Limited

Counter with reset when the upper limit is reached.

counter limited

Description

The Counter Limited block counts until the specified upper limit is reached. The counter then returns to zero and starts counting again. The counter is always initialised with zero.

Ports

Output

Port_1 - counter values
scalar

Counter value as an unsigned integer with a bit size of 8, 16 or 32 bits. The block uses the smallest number of bits required to represent the upper limit.

Data types: Float64.

Parameters

Upper limit - upper limit
7 (by default) | scalar

The limit value as a finite real scalar.

Usage in program code

Block parameter

uplimit

Value

scalar

By default

7

Sample time - interval between calculation steps
-1 (by default) | scalar

Specify the interval between calculation steps as a non-negative number. To inherit the calculation step, set this parameter to -1.

Usage in program code

Block parameter

tsamp

Values

scalar | vector

* By default*

-1

Additional options

C code generation: Yes