blockTrueHold
Information
Block that holds a true input signal for at least a defined time period.
At initialization, the output y is equal to the input u.
If the input u becomes true, or is true
during intialization, a timer starts
and the Boolean output y stays true for the time
period provided by the parameter duration.
When this time is elapsed, the input is checked again. If
it is true, then the timer is restarted and the output remains
true for another duration seconds.
If the input u is false after
holdTime seconds, then the ouput is switched to false,
until the input becomes true again.
The figure below shows the state chart of the implementation. Note that the transition are done in zero time.
The figure below shows an example with a hold time of 3600 seconds and a pulse width period 9000 seconds that starts at t=200 seconds.
The figure below shows an example with a hold time of 60 seconds and a pulse width period 3600 seconds that starts at t=0 seconds.
The next two figures show the same experiment, except that the input u
has been negated. The figure below has again a hold time of 3600 seconds
and a pulse width period 9000 seconds that starts at t=200 seconds.
The figure below has again a hold time of 60 seconds and a pulse width period 3600 seconds that starts at t=0 seconds.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | duration | Time duration of the true output signal hold |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | u | Boolean input signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput | y | Boolean output signal |
Revisions
-
June 13, 2024, by Antoine Gautier:
Moved this model to theObsoletepackage.
This is for issue 3787. -
March 27, 2024, by Michael Wetter:
Renamed block fromTrueHoldWithResettoTrueHold.
This is for issue 3689. -
November 12, 2020, by Michael Wetter:
Reformulated to remove dependency toModelica.Units.SI.
This is for issue 2243. -
September 18, 2017, by Michael Wetter:
Improved event handling. -
June 13, 2017, by Michael Wetter:
Reimplemented model using a state graph to avoid having to test for equality within tolerance. This implementation is also easier to understand.
This is for issue 789. -
May 24, 2017, by Milica Grahovac:
First implementation.