blockWhenRising
When condition input has a rising edge, check must be true
Extends from Modelica_Requirements.Interfaces.PartialCheck (Interfaces and icon for check block).
Information
Syntax
property = WhenRising(condition=..., check=...).y;
Description
At the time instants where condition has a rising edge, property is set to "BooleanToProperty(check)" (so either Satisfied or Violated) and keeps this value until the next rising edge. Before the first rising edge, property = Undecided. If condition = true during initialization, property = toProperty(check) at initialization.
Violated, Undecided, and Satisfied are elements of enumeration Property.
Example
The property is demonstrated with the following example:
results in
![]() |
|
| simulation result |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanInput | condition (from PartialCheck) | Boolean input condition signal | |
| Modelica_Requirements.Interfaces.PropertyOutput | y (from PartialCheck) | Property output signal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | check (from PartialCheck) | Boolean to check |
