blockTimer

Timer measuring the time from the time instant where the Boolean input became true

Extends from Modelica.Icons.ObsoleteModel (Icon for classes that are obsolete and will be removed in later versions).

Information

Timer with option to accumulate time until it is reset by an input signal.

Each time the Boolean input u becomes true, the timer runs, otherwise it is dormant.

  • If the parameter accumulate is false, the timer is set to zero each time the input u becomes false. The value of input reset will be ignored.
  • If the parameter accumulate is true, the timer accumulates time, and the timer is set to zero only when the value of the input reset becomes true.

Parameters

TypeNameDefaultDescription
BooleanaccumulatefalseIf true, accumulate time until Boolean input 'reset' becomes true, otherwise reset timer whenever u becomes true

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputuConnector for signal that switches timer on if true, and off if false
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputresetConnector for signal that sets timer to zero if it switches to true. The input value will be ignored if the timer does not accumulate time
Buildings.Controls.OBC.CDL.Interfaces.RealOutputyTimer output

Revisions

  • August 28, 2020, by Michael Wetter:
    Corrected implementation for situation where the simulation does not start at zero.
  • August 26, 2020, by Jianjun Hu:
    Moved to obsolete package.
    This is for issue 2101.
  • July 31, 2020, by Jianjun Hu:
    Fixed the reset input. This is for issue 2056.
  • November 8, 2019, by Michael Wetter:
    Revised implementation. This is for issue 1221.
  • July 23, 2018, by Jianjun Hu:
    Added conditional boolean input for cumulative time measuring. This is for issue 1221.
  • July 18, 2018, by Jianjun Hu:
    Updated implementation to output accumulated true input time. This is for issue 1212.
  • January 3, 2017, by Michael Wetter:
    First implementation, based on the implementation of the Modelica Standard Library.