WhenRising model

Requirements.Examples.Elementary.ChecksInFixedWindow.WhenRising  ยท source

Icon of WhenRising

Example for WhenRising (return Satisfied when check is true and condition has a rising edge)

Extends Modelica.Icons.Example

Using check block WhenRising 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 rising edges at 1, 3 and 4 s. whenRising1 checks check1 at the rising edges of condition1, whenRising2 checks check1 at the rising edges of the negated condition condition2 (the falling edges of condition1), and whenRising3 checks the negated check check2 at the rising edges of condition1. The three outputs show the Satisfied and Violated verdicts at the edge instants.

Components and variables

NameTypeDescription
check1Modelica.Blocks.Sources.BooleanTableCheck signal, true until 1.5 s, toggling at 1.5, 3.3 and 4.2 s
condition1Modelica.Blocks.Sources.BooleanTableCondition signal with rising edges at 1, 3 and 4 s
whenRising1Requirements.ChecksInFixedWindow.WhenRisingcheck1 must be true at every rising edge of condition1
whenRising2Requirements.ChecksInFixedWindow.WhenRisingcheck1 must be true at every rising edge of the negated condition
condition2Modelica.Blocks.MathBoolean.NotNegated condition1
whenRising3Requirements.ChecksInFixedWindow.WhenRisingThe negated check must be true at every rising edge of condition1
check2Modelica.Blocks.MathBoolean.NotNegated check1