BooleanToInteger
Convert Boolean to Integer signal
Library
Modelica/Blocks/Math
Description
This block computes the output yas Integer equivalent of the Boolean input u:
y = if u then integerTrue else integerFalse;
where u is of Boolean and y of Integer type,and integerTrue and integerFalse are parameters.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_integerTrue | integerTrue | Output signal for true Boolean input | Scalar | |
mo_integerFalse | integerFalse | Output signal for false Boolean input | Scalar |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | ||
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
u | implicit | Connector of Boolean input signal | input | 1 |
y | implicit | Connector of Integer output signal | output | 1 |