Rising model
Requirements.Examples.Elementary.Margin.Rising
ยท source
The five count checks on one edge train: the margins are count differences, scale 1
Extends Modelica.Icons.Example
One condition phase [1, 5) s with rising edges of the check at 2, 3 and 4 s against
FixedRising(3), MinRising(2), MaxRising(2), BandRising(1, 2) and
NoRising, every scale = 1 (a count has no other unit). The blocks' countRising
is an output now and the margins are count differences -- −|count − 3|,
count − 2, 2 − count, min(count − 1, 2 − count),
−count -- asserted exactly between the edges. MaxRising turns Violated at the third edge with
margin −1, BandRising too; FixedRising's margin is 0 when satisfied (an exact count has no headroom);
MaxRising is Undefined after the phase and its margin is masked then.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Components and variables
| Name | Type | Description |
|---|---|---|
condition | Modelica.Blocks.Sources.BooleanTable | true on [1, 5) |
check | Modelica.Blocks.Sources.BooleanTable | rising edges at 2, 3, 4 s |
fixedRising | Requirements.ChecksInFixedWindow.FixedRising | Exactly 3 rising edges in the condition phase |
minRising | Requirements.ChecksInFixedWindow.MinRising | At least 2 rising edges in the condition phase |
maxRising | Requirements.ChecksInFixedWindow.MaxRising | At most 2 rising edges in the condition phase |
bandRising | Requirements.ChecksInFixedWindow.BandRising | Between 1 and 2 rising edges in the condition phase |
noRising | Requirements.ChecksInFixedWindow.NoRising | No rising edge in the condition phase |