blockLastTrueIndex

Information

Returns the index of the last 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
Buildings.Templates.Plants.Controls.Utilities.MultiMaxIntegermulMaxReturn minimum index

Revisions

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