Counter Free-Running
Incremental counter with reset to zero after reaching the maximum value for the specified number of bits.
blockType: Counter Free-Running
Path in the library:
|
Description
The block Counter Free-Running counts until it reaches a maximum value equal to , where is the number of bits. Then the counter is reset to zero and starts increasing again.
Ports
Output
#
OUT_1
—
counter values
scalar
Details
Counter value as an unsigned integer with a bit size of 8, 16 or 32 bits.
Data types |
|
Complex numbers support |
No |
Parameters
Main
#
Sample time —
interval between calculation steps
SampleTime (real number / vector of two real numbers)
Details
Specify the interval between calculation steps as a non-negative number. To inherit a calculation step, set this parameters to -1
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Number of bits —
number of bits
Real number
Details
Specify the number of bits as a real scalar. When you specify:
-
positive integer, for example
8
, the block counts up to , that is, up to255
. -
an unsigned integer expression, such as
UInt8(8)
, the block counts up to , that is, up to254
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |