blockSwitch

Switch between two Real signals

Information

Block that outputs one of two real input signals based on a boolean input signal.

If the input signal u2 is true, the block outputs y = u1. Otherwise, it outputs y = u3.

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputu1Input u1
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputu2Boolean switch input signal, if true, y=u1, else y=u3
Buildings.Controls.OBC.CDL.Interfaces.RealInputu3Input u3
Buildings.Controls.OBC.CDL.Interfaces.RealOutputyOutput with u1 if u2 is true, else u3

Revisions

  • February 27, 2023, by Michael Wetter:
    Added smoothOrder(0, ...) as Dymola 2023x assumes y to be smooth, and simulations can then fail if it differentiated this output.
  • July 17, 2020, by Jianjun Hu:
    Changed icon to display dynamically which input signal is being outputted.
    This is for Buildings, issue 2033.
  • January 3, 2017, by Michael Wetter:
    First implementation, based on the implementation of the Modelica Standard Library.