CompareToConstant
This block compares its input with a constant parameter by way of a relational operator.
Library
LogicalOperations
Description
The CompareToConstant block compares input with a constant by way of a relational operator, and produces a double output, 1 for true, and 0 for false.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
op | Relational operator | Operator with which the input will be compared with a constant. | '==' | |
C | Constant | Constant used as the criterion for the comparison based on the relational operator. | ||
zcr | Apply zero crossing | Turn this parameter on to detect the zero crossings. Default is off. | Number | 0 |
externalActivation | External Activation | Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | 1 | |
Port 2 | explicit | output | 1 | |
Port 3 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | yes | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |