blockBooleanExtractor

Extract scalar signal out of boolean signal vector dependent on integer input index

Information

Block that returns

    y = u[index];

where u is a vector-valued Boolean 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.BooleanInput[nin]uBoolean input signals
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputyBoolean signal extracted from input vector, u[index]

Revisions

  • September 30, 2022, by Jianjun Hu:
    First implementation.