blockChange

Output whether the Integer input changes values, increases or decreases

Information

Block that evaluates the integer input u to check if its value changes.

  • When the input u changes, the output y will be true, otherwise it will be false.
  • When the input u increases, the output up will be true, otherwise it will be false.
  • When the input u decreases, the output down will be true, otherwise it will be false.

Parameters

TypeNameDefaultDescription
Integerpre_u_start0Start value of pre(u) at initial time

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.IntegerInputuInteger to be monitored for a change in value
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputyOutput that is true when the input changes its value
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputupOutput that is true when the input increased its value
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputdownOutput that is true when the input decreased its value

Revisions

  • May 6, 2026, by Antoine Gautier:
    Replaced initial equation with start attribute on input. This is for Buildings, issue 4581.
  • May 3, 2022, by Michael Wetter:
    Renamed parameter y_start to pre_u_start.
    This is for Buildings, issue 2990.
  • January 26, 2021, by Michael Wetter:
    Changed initialization of pre(u) to use the initial value of the input rather than 0.
    This is for Buildings, issue 2294.
  • July 18, 2018, by Michael Wetter:
    Revised model and icon.
  • July 13, 2018, by Jianjun Hu:
    First implementation, based on the implementation of the Modelica Standard Library.