Products

Novartis Accelerates Model Development Process with MathWorks Tools

Having a single, widely used package in our industry that has many capabilities for solving ordinary differential equations as well as optimization and statistical capabilities is quite valuable. That is why we use MathWorks tools. - Anna Georgieva, Novartis

Yokogawa Electric Develops Key Components for Next-Generation Optical Networks with Simulink and Men

"End-to-end system development with Simulink has streamlined our current design flow. We found virtually all bugs before hardware prototyping using Simulink and Mentor Graphics, and this cut development time in half." - Chie Sato, Yokogawa Electric Corporation

Description

Executing State Charts

After modeling your logic in Stateflow, you can simulate and view its behavior live to test and validate your design. A graphical debugger helps you resolve simulation run-time errors and diagnose unexpected behavior in your design.


Visualizing Results

During simulation, you can visualize the Stateflow chart by:

  •     Highlighting the active states and the transition paths taken
  •     Viewing states and data with the displays and scopes provided in Simulink
  •     Building your own custom displays using MATLAB visualization and graphical user interface development tools

After simulation, you can log states and data for postprocessing.

 

Stateflow Executing State Charts 40483 wm sf fig8 w 15299

Floating scope (left) from Simulink for viewing state transitions as the simulation runs. Specific states can be selected using the Signal Selector (right) within Simulink.


Debugging a Simulation

The Stateflow debugger lets you set breakpoints, control the simulation execution, and display model information. It can be run from a graphical user interface (GUI) or from the MATLAB command line. The GUI provides clear information about the chart's execution status. You can display information on breakpoints, current data values, active states, and the call stack.

Run-time errors can also be detected with the debugger. These include state inconsistencies, transition conflicts, data range violations, potential infinite loops, and ill-specified truth tables.

 

Stateflow Executing charts 240484 wm sf fig9 w 15300

Stateflow debugger, which can set breakpoints, start and stop simulations, evaluate run-time errors, and perform dynamic error checking.


Validating Your Design

You can map requirements directly to Stateflow objects and collect model coverage metrics using Simulink® Verification and Validation (available separately).
Generating Code

Stateflow charts can be deployed to many applications using Simulink Coder (available separately).