AfterFor model
Requirements.Examples.Elementary.TimeLocators.AfterFor
ยท source
Example for AfterFor (output is true, after rising edge of input for defined duration)
Extends Modelica.Icons.Example
Using time locator block AfterFor as
results in
![]() | |
| simulation result |
The input u of afterFor is the Boolean table timeTable, which is true on
[1, 3), [5, 5.2), [9, 9.2) and [9.5, 9.7) s, i.e. it has rising edges at 1, 5, 9 and 9.5 s. With duration
= 1 s, the output is true for 1 s after every rising edge, independently of how long the input stays true. The edges at
9 s and 9.5 s are closer together than the duration, which shows how overlapping time windows are handled.
Components and variables
| Name | Type | Description |
|---|---|---|
afterFor | Requirements.TimeLocators.AfterFor | True for 1 s after every rising edge of timeTable |
timeTable | Modelica.Blocks.Sources.BooleanTable | Boolean signal with rising edges at 1, 5, 9 and 9.5 s |

