WhenFalling model
Requirements.Examples.Elementary.ChecksInFixedWindow.WhenFalling
ยท source
Example for WhenFalling (return Satisfied when check is true and condition has a falling edge)
Extends Modelica.Icons.Example
Using check block WhenFalling as
results in
![]() | |
| simulation result |
check1 is true until 1.5 s, false until 3.3 s, true until 4.2 s and false afterwards;
condition1 has falling edges at 2 and 3.5 s. whenFalling1 checks check1 at the
falling edges of condition1, whenFalling2 checks check1 at the falling edges of
the negated condition condition2 (the rising edges of condition1), and
whenFalling3 checks the negated check check2 at the falling edges of condition1.
The three outputs show the Satisfied and Violated verdicts at the edge instants.
Components and variables
| Name | Type | Description |
|---|---|---|
check1 | Modelica.Blocks.Sources.BooleanTable | Check signal, true until 1.5 s, toggling at 1.5, 3.3 and 4.2 s |
condition1 | Modelica.Blocks.Sources.BooleanTable | Condition signal with falling edges at 2 and 3.5 s |
whenFalling1 | Requirements.ChecksInFixedWindow.WhenFalling | check1 must be true at every falling edge of condition1 |
whenFalling2 | Requirements.ChecksInFixedWindow.WhenFalling | check1 must be true at every falling edge of the negated condition |
condition2 | Modelica.Blocks.MathBoolean.Not | Negated condition1 |
whenFalling3 | Requirements.ChecksInFixedWindow.WhenFalling | The negated check must be true at every falling edge of condition1 |
check2 | Modelica.Blocks.MathBoolean.Not | Negated check1 |

