Stateflow | ![]() ![]() |
Defining the Stateflow Block Update Method
Stateflow Block Update Methods
Stateflow blocks are Simulink subsystems. You have some flexibility in defining the type of Simulink subsystem of a particular Stateflow block. The chart is awakened when an event occurs. You can choose from these methods of having the chart awakened, entered, and executed:
This is the default update method.
The Stateflow block is explicitly triggered by a signal originating from a connected Simulink block. The edge trigger can be set to Rising, Falling, Either, or Function Call.
The Stateflow block inherits (implicitly) triggers from the Simulink model. These implicit events are the sample times (discrete-time or continuous) of the Simulink signals providing inputs to the chart. The sample times are determined by Simulink to be consistent with various rates of all the incoming signals.
Simulink will awaken (sample) the Stateflow block at the rate you specify. An implicit event is generated by Simulink at regular time intervals corresponding to the specified rate. The sample time is in the same units as the Simulink simulation time. Note that other blocks in the Simulink model may have different sample times.
Simulink will awaken (sample) the Stateflow block at each step in the simulation, as well as at intermediate time points that can be requested by the Simulink solver. This method is consistent with the continuous method in Simulink.
See Using Simulink for more information on these types of Simulink subsystems.
![]() | Defining Stateflow Interfaces | Defining a Triggered Stateflow Block | ![]() |