blockIntegerExtractor
Extract scalar signal out of integer signal vector dependent on integer input index
Information
Block that returns
y = u[index];
where u is a vector-valued Integer input signal and
index is an Integer input signal. When the index
is out of range,
-
then
y = u[nin]ifindex > nin, and -
y = u[1]ifindex < 1.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nin | 1 | Number of inputs |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | index | Index of input vector element to be extracted out | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nin] | u | Integer input signals | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput | y | Integer signal extracted from input vector, u[index] |
Revisions
-
October 5, 2022, by Jianjun Hu:
First implementation.