blockMultiSwitch
Set Real expression that is associated with the first active input signal
Information
The block has a vector of Boolean input signals u[nu] and a vector of
(time varying) Real expressions expr[:]. The output signal y is
set to expr[i], if i is the first element in the input vector u that is true. If all input signals are
false, y is set to parameter "y_default":
// Conceptual equation (not valid Modelica)
i = 'first element of u[:] that is true';
y = if i==0 then y_default else expr[i];
Parameters
| Type | Name | Default | Description |
| Real | y_default | 0.0 | Default value of output y if all u[i] = false |
| Integer | nu | 0 | Number of input connections |
| Advanced |
| Integer | precision | 3 | Number of significant digits to be shown in dynamic diagram layer for y |
Components
| Type | Name | Default | Description |
| Real[nu] | expr | fill(0.0, nu) | y = if u[i] then expr[i] else y_default (time varying) |