blockBooleanToInteger

Convert Boolean to Integer signal

Information

Block that outputs the Integer equivalent of the Boolean input.

  y = if u then integerTrue else integerFalse;

where u is of Boolean and y of Integer type, and integerTrue and integerFalse are parameters.

Parameters

TypeNameDefaultDescription
IntegerintegerTrue1Output signal for true Boolean input
IntegerintegerFalse0Output signal for false Boolean input

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputuBoolean signal to be converted to an Integer signal
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutputyConverted input signal as an Integer

Revisions

  • May 17, 2022, by Hongxiang Fu:
    Corrected documentation texts where the variables were described with wrong types.
    This is for Buildings, issue 3016.
  • January 3, 2017, by Michael Wetter:
    First implementation, based on the implementation of the Modelica Standard Library.