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
accumulateisfalse, the timer is set to zero each time the inputubecomesfalse. The value of inputresetwill be ignored. -
If the parameter
accumulateistrue, the timer accumulates time, and the timer is set to zero only when the value of the inputresetbecomestrue.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | accumulate | false | If true, accumulate time until Boolean input 'reset' becomes true, otherwise reset timer whenever u becomes true |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | u | Connector for signal that switches timer on if true, and off if false | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | reset | Connector 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.RealOutput | y | Timer 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.