Stateflow    

Look at the Power Switch Model

The completed power switch model is built in Simulink and Stateflow. The following displays a completed power switch model:

The bottom diagram is the Stateflow chart for the On_off Stateflow block shown in the Simulink model above it. If you double-click a Stateflow block in Simulink, its Stateflow diagram appears in the Stateflow diagram editor window.

When you simulate this model, the input event from Simulink, shown as Switch in the Stateflow chart, toggles the activity of the states between the states Power_on and Power_off.


  Quick Start Create a Simulink Model