blockTimerAccumulating
Accumulating timer that can be reset
Information
Timer that accumulates time until it is reset by an input signal.
If the Boolean input u is true,
the output y is the time that has elapsed while u has been true
since the last time reset became true.
If u is false, the output y holds its value.
If the output y becomes greater than the threshold time t,
the output passed is true.
Otherwise it is false.
When reset becomes true, the timer is reset to 0.
In the limiting case where the timer value reaches the threshold t
and the input u becomes false simultaneously,
the output passed remains false.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | t | 0 | Threshold time for comparison |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | u | Input 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 | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | y | Elapsed time | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput | passed | Output with true if the elapsed time is greater than threshold |
Revisions
-
November 12, 2020, by Michael Wetter:
Reformulated to remove dependency toModelica.Units.SI.
This is for Buildings, issue 2243. -
August 28, 2020, by Michael Wetter:
Revised implementation to correctly deal with non-zero simulation start time, and to avoid state events.
This is for Buildings, issue 2101. -
August 26, 2020, by Jianjun Hu:
Removed parameteraccumulateand added outputpassed.
This is for Buildings, issue 2101. -
July 31, 2020, by Jianjun Hu:
Fixed the reset input. This is for Buildings, issue 2056. -
November 8, 2019, by Michael Wetter:
Revised implementation. This is for Buildings, issue 1221. -
July 23, 2018, by Jianjun Hu:
Added conditional boolean input for cumulative time measuring. This is for Buildings, issue 1221. -
July 18, 2018, by Jianjun Hu:
Updated implementation to output accumulated true input time. This is for Buildings, issue 1212. -
January 3, 2017, by Michael Wetter:
First implementation, based on the implementation of the Modelica Standard Library.