Rising edge
True for one instant when the input becomes true.
- Boolean
- Modelica Standard Library
- 2 ports
edgeLibraryLogicDescription
Detects rising edges: the output is true only at the event instant when the input changes from false to true, and false at all other times.
Example
Latch, timer, and sampler Start and stop buttons set and reset a flip-flop, which times the run, gates a signal, and samples the start time.
EnableStartStopEnabled startStart edgeStop edgeRunningRun timeSine 1 Hz0Gated sineClockStart time
Also in this example:ConstantSine waveClockANDSwitch (logic)RS flip-flopTimerBoolean constantBoolean stepTriggered sampler
Ports
Inputs 1
-
u
Boolean input.
Outputs 1
-
y
True at the instant u rises, otherwise false.
Equations
Modelica
y = u ∧ ¬u⁻ u⁻ is the value just before the current event; u⁻ = false at t = 0.
Implementation
Modelica Standard Library 4.1.0
MSL documentation Modelica.Blocks.Logical.EdgeAssumptions and limitations
- The true pulse has zero duration, so it may not be visible in plotted results.
- Because u⁻ starts false, an input that is true at t = 0 gives y = true at t = 0.
Tips
- Use it to trigger discrete actions such as Triggered sampler or the S input of RS flip-flop.
See also
Select a block in Gradara and press F1 to open its page offline.