blockFirstTrueIndex

Information

Returns the index of the first true element of the Boolean input vector. If no element is true, the block returns 0.

Parameters

TypeNameDefaultDescription
Integernin0Size of input array

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin]u1Array of Boolean signals
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutputyIndex of first element being true

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger[nin]booToIntReturn index if element is true, 0 otherwise
MultiMinIntegermulMinReturn minimum index
Buildings.Controls.OBC.CDL.Integers.EqualintEqu
Buildings.Controls.OBC.CDL.Integers.SwitchintSwi
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantconInt
Buildings.Controls.OBC.CDL.Integers.Sources.Constantzer

Revisions

  • March 29, 2024, by Antoine Gautier:
    First implementation.