AfterUntil model

Requirements.Examples.Elementary.TimeLocators.AfterUntil  ยท source

Icon of AfterUntil

Example for AfterUntil (output is true, after rising edge of input u1 until rising edge of input u2)

Extends Modelica.Icons.Example

Using time locator block AfterUntil as

results in

simulation result

The input u1 of afterUntil1 is the start signal pulse1 (period 2 s, rising edges at 0, 2, 4, 6 s), the input u2 is the stop signal pulse2 (period 1.5 s, rising edges from 3 s on). The output becomes true at a rising edge of u1 and false again at the next rising edge of u2. Before 3 s there is no stop edge, so once the output has become true it remains true until the first rising edge of pulse2 at 3 s.

Components and variables

NameTypeDescription
pulse1Modelica.Blocks.Sources.BooleanPulseStart signal: Boolean pulse with period 2 s
pulse2Modelica.Blocks.Sources.BooleanPulseStop signal: Boolean pulse with period 1.5 s, starting at 3 s
afterUntil1Requirements.TimeLocators.AfterUntilTrue from a rising edge of pulse1 until the next rising edge of pulse2