Stateflow | ![]() ![]() |
Defining Edge-Triggered Output Events
Simulink controls the execution of edge-triggered subsystems with output events. These are essential conditions that define this use of triggered output events:
Edge-Triggered Semantics Example
In this example the transition from state A
to state B
(in the Stateflow diagram) has a transition action that specifies the broadcast of event1
. event1
is defined in Stateflow to be an Output to Simulink with an Either edge trigger type. The Stateflow block output port for event1
is connected to the trigger port of the band pass filter1
Simulink block. The band pass filter1
block has its Trigger type field set to Either edge.
This sequence is followed when state A
is active and the transition from state A
to state B
is valid and is taken:
A
exit actions execute and complete.
A
is marked inactive.
B
is marked active.
B
entry actions execute and complete (x = x++
).
band
pass
filter1
block is triggered, executes, and completes.
![]() | Defining Function Call Output Events | MATLAB Workspace Interfaces | ![]() |