User`s guide
Related Products and Documentation
xix
Stateflow machine. This S-function is the agent Simulink interacts with for
simulation and analysis.
The control behavior that Stateflow models complements the algorithmic
behavior modeled in Simulink block diagrams. By incorporating Stateflow
diagrams into Simulink models, you can add event-driven behavior to
Simulink simulations. You create models that represent both data and control
flow by combining Stateflow blocks with the standard Simulink blocksets.
These combined models are simulated using Simulink.
The Using Simulink document describes how to work with Simulink. It
explains how to manipulate Simulink blocks, access block parameters, and
connect blocks to build models. It also provides reference descriptions of each
block in the standard Simulink libraries.
What Is Stateflow?
Stateflow is a powerful graphical design and development tool for complex
control and supervisory logic problems. Stateflow supports flow diagram
notation as well as state transition notation. Using Stateflow you can:
• Visually model and simulate complex reactive systems based on finite state
machine theory.
• Design and develop deterministic, supervisory control systems.
• Use flow diagram notation and state transition notation seamlessly in the
same Stateflow diagram.
• Easily modify your design, evaluate the results, and verify the system's
behavior at any stage of your design.
• Automatically generate integer or floating-point code directly from your
design.
• Take advantage of the integration with the MATLAB and Simulink
environments to model, simulate, and analyze your system.
Flow diagram notation is essentially logic represented without the use of
states. In some cases, using flow diagram notation is a closer representation of
the system’s logic and avoids the use of unnecessary states. Flow diagram
notation is an effective way to represent common code structures like
for loops
and
if-then-else constructs.
Stateflow also provides clear, concise descriptions of complex system behavior
using finite state machine theory, flow diagram notations, and state-transition