blockToggle
Toggles output value whenever its input turns true
Information
Block that generates a true output when toggle input u
rises from false to true, provided that the clear input
clr is false or also became at the same time
false. The output remains true until
-
the toggle input
urises fromfalsetotrueagain, or -
the clear input
clrrises fromfalsetotrue.
If the clear input clr is true, the output y
switches to false (if it was true) and it remains false,
regardless of the value of the toggle input u.
At initial time, if clr = false, then the output will be
y = u. Otherwise it will be y=false
(because the clear input clr is true).
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | u | Toggle input | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | clr | Clear input | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput | y | Output with toggled signal |
Revisions
-
October 13, 2020, by Jianjun Hu:
Removed the parameterpre_y_start, and made the initial output to be equal to toggle input when the clear input isfalse.
This is for Buildings, issue 2177. -
March 9, 2020, by Michael Wetter:
Simplified implementation, and made model work with OpenModelica. -
April 4, 2019, by Jianjun Hu:
Corrected implementation that causes wrong output at initial stage. This is for Buildings, issue 1402. -
March 31, 2017, by Jianjun Hu:
First implementation.