blockBooleanToReal

Convert Boolean to Real signal

Information

Block that outputs the Real equivalent of the Boolean input.

  y = if u then realTrue else realFalse;

where u is of Boolean and y of Real type, and realTrue and realFalse are parameters.

Parameters

TypeNameDefaultDescription
RealrealTrue1.0Output signal for true Boolean input
RealrealFalse0.0Output signal for false Boolean input

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputuBoolean signal to be converted to a Real signal
Buildings.Controls.OBC.CDL.Interfaces.RealOutputyConverted input signal as a Real

Revisions

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