Counter
This externally activated block counts up or down depending on the choice of the block parameter, Rule.
Library
SignalGenerators
Description
The Counter block implements a counter which is either increasing (from minimum value to maximum value) or decreasing (from upper maximum to minimum value). The counter initial value is a block parameter and increments (or decrements) are specified by the Step parameter.
The block is externally activated: an activation port is placed on the block to connect to an event generator such as an EventClock block.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
minim | Minimum | Matrix | ||
step | Step | Scalar | ||
maxim | Maximum | Matrix | ||
Initv | Initial output | Matrix | ||
rule | Rule | Counter counts up or counts down. | String | 'Increment' |
typ | Output datatype | Specifies the output datatype. Complex datatype is not supported. | String | 'double' |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | activation | input | 1 | |
Port 2 | explicit | output | 1 |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | standard mode activation | |
direct-feedthrough | no | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | yes |