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] if index > nin, and
  • y = u[1] if index < 1.

Parameters

TypeNameDefaultDescription
Integernin1Number of inputs

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.IntegerInputindexIndex of input vector element to be extracted out
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nin]uInteger input signals
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutputyInteger signal extracted from input vector, u[index]

Revisions

  • October 5, 2022, by Jianjun Hu:
    First implementation.