After model

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

Icon of After

Example for After (output is true, after first rising edge of input)

Extends Modelica.Icons.Example

Using time locator block After as

results in

simulation result

Two After blocks receive Boolean pulses with a period of 2 s through their input u: pulse1 rises first at 0 s, pulse2 at 3 s. The output of after1 and after2 is false until the first rising edge of the respective input and true from then on, so after2 switches to true at 3 s. Later edges of the input have no effect. Since pulse1 rises at the start time, after1 shows how the block treats an edge at the initial time.

Components and variables

NameTypeDescription
pulse1Modelica.Blocks.Sources.BooleanPulseBoolean pulse with period 2 s, first rising edge at 0 s
pulse2Modelica.Blocks.Sources.BooleanPulseBoolean pulse with period 2 s, first rising edge at 3 s
after1Requirements.TimeLocators.AfterTrue from the first rising edge of pulse1 on
after2Requirements.TimeLocators.AfterTrue from the first rising edge of pulse2 on