Products & Services Solutions Academia Support User Community Company

Learn more about Stateflow   

Version 7.4 (R2009b) Stateflow and Stateflow Coder Software

This table summarizes what's new in V7.4 (R2009b):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated Documentation at Web Site
Yes
Details below
Yes—Details labeled as Compatibility Considerations, below. See also Summary.

Bug Reports
Includes fixes

Printable Release Notes: PDF

Current product documentation

New features and changes introduced in this version are:

Ability to Copy Simulink Function-Call Subsystems and Paste in Stateflow Editor as Simulink Functions, and Vice Versa

You can copy a function-call subsystem from a model and paste directly in the Stateflow® Editor. This enhancement eliminates the steps of manually creating a Simulink function in your chart and pasting the contents of the subsystem into the new function. You can also copy a Simulink function from a chart and paste directly in a model as a function-call subsystem.

For more information, see Using Simulink Functions in Stateflow Charts in the Stateflow and Stateflow Coder User's Guide.

Ability to Generate Switch-Case Statements for Flow Graphs and Embedded MATLAB Functions Using Real-Time Workshop Embedded Coder Software

If a flow graph or Embedded MATLAB™ function in your chart uses if-elseif-else decision logic, you can choose to generate switch-case statements during Real-Time Workshop® Embedded Coder™ code generation. Switch-case statements provide more readable and efficient code than if-elseif-else statements when multiple decision branches are possible.

When you load models created in R2009a and earlier, this optimization is off to maintain backward compatibility. In previous versions, if-elseif-else logic appeared unchanged in generated code.

For more information, see:

Support for Creating Switch-Case Flow Graphs Using the Pattern Wizard

In the Pattern Wizard, you can now choose to create a flow graph with switch-case decision logic. For more information, see Modeling Logic Patterns and Iterative Loops Using Flow Graphs in the Stateflow and Stateflow Coder User's Guide.

Support for Using More Than 254 Events in a Chart

You can now use more than 254 events in a chart. The previous limit of 254 events no longer applies. This enhancement supports large-scale models with charts that send and receive hundreds of events during simulation. Although Stateflow software does not limit the number of events, the underlying C compiler enforces a theoretical limit of (2^31)-1 events for the generated code.

For more information, see Defining Events in the Stateflow and Stateflow Coder User's Guide.

Improved Panning and Selection of States and Transitions When Using Stateflow Debugger

During single-step mode, the Stateflow Debugger no longer zooms automatically to the chart object that is executing. Instead, the debugger opens the subviewer that contains that object. This enhancement minimizes visual disruptions as you step through your analysis of a simulation.

For more information, see Options to Control Execution Rate in the Debugging Window in the Stateflow and Stateflow Coder User's Guide.

Stateflow Compilation Status Added to Progress Indicator on Simulink Status Bar

For Windows® platforms, messages about Stateflow compilation status now appear on the status bar of the Simulink Model Editor when you update diagram.

Support for Chart Inputs and Outputs That Vary in Dimension During Simulation

Stateflow charts now support input and output data that vary in dimension during simulation. In this release, only Embedded MATLAB functions nested in the charts can manipulate these input and output data.

For more information, see Using Variable-Size Data in Stateflow Charts and Working with Variable-Size Data in Embedded MATLAB Functions in the Stateflow and Stateflow Coder User's Guide.

New Compilation Report for Embedded MATLAB Functions in Stateflow Charts

The new compilation report provides compile-time type information for the variables and expressions in your Embedded MATLAB functions. This information helps you find the sources of error messages and understand type propagation issues, particularly for fixed-point data types. For more information, see Working with Compilation Reports in the Simulink User's Guide.

Compatibility Considerations

The new compilation report is not supported by the MATLAB internal browser on Sun™ Solaris™ 64-bit platforms. To view the compilation report on Sun Solaris 64-bit platforms, you must have your MATLAB Web preferences configured to use an external browser, for example, Mozilla® Firefox®. To learn how to configure your MATLAB Web preferences, see Web Preferences in the MATLAB documentation.

Enhanced Support for Replacing Math Functions with Target-Specific Implementations

You can now replace the following math functions with target-specific implementations:

FunctionData Type Support
atan2Floating-point
fmodFloating-point
ldexpFloating-point
maxFloating-point and integer
minFloating-point and integer

Replacement of abs now works for both floating-point and integer arguments. Previously, replacement of abs with a target function worked only for floating-point arguments.

For more information about Target Function Libraries, see:

Enhanced Context Menu Support for Adding Flow Graph Patterns to Charts

In the Stateflow Editor, you can now right-click at any level of the chart hierarchy (for example, states and subcharts) to insert flow graphs using the Patterns context menu. Previously, options in this context menu were available only if you right-clicked at the chart level.

Option to Log Chart Signals Available in the Stateflow Editor

To log chart signals, you can select Tools > Log Chart Signals in the Stateflow Editor. Previously, you had to right-click the Stateflow block in the Model Editor to open the Signal Logging dialog box.

For more information, see Logging Chart Signals Using the Signal Logging Dialog Box in the Stateflow and Stateflow Coder User's Guide.

Default Precision Set to Double for Calls to C Math Functions

When you call C math functions, such as sin, exp, or pow, double precision applies unless the first input argument is explicitly single precision. For example, if you call the sin function with an integer argument, a cast of the input argument to a floating-point number of type double replaces the original argument. This behavior ensures consistent results between Simulink blocks and Stateflow charts for calls to C math functions.

To force a call to a single-precision version of a C math function, you must explicitly cast the function argument using the single cast operator. This method works only when a single-precision version of the function exists in the selected Target Function Library as it would in the 'C99 (ISO)' Target Function Library. For more information, see Calling C Functions in Actions and Type Cast Operations in the Stateflow and Stateflow Coder User's Guide.

Change in Text and Visibility of Parameter Prompt for Easier Use with Fixed-Point Advisor and Fixed-Point Tool

In the Data properties dialog box, the Lock output scaling against changes by the autoscaling tool check box is now Lock data type setting against changes by the fixed-point tools. Previously, this check box was visible only if you entered an expression or a fixed-point data type, such as fixdt(1,16,0). This check box is now visible for any data type specification. This enhancement enables you to lock the current data type settings on the dialog box against changes that the Fixed-Point Advisor or Fixed-Point Tool chooses.

For more information, see Fixed-Point Data Properties and Automatic Scaling of Stateflow Fixed-Point Data in the Stateflow and Stateflow Coder User's Guide.

Charts Closed By Default When Opening Models Saved in Formats of Earlier Versions

If you save a model with Stateflow charts in the format of an earlier version, the charts appear closed when you open the new MDL-file.

New and Enhanced Demos

The following demo has been added in R2009b:

Demo...Shows how you can...
sf_aircraftDesign a fault detection, isolation, and recovery (FDIR) application for a pair of aircraft elevators with redundant actuators

The following demo has been enhanced in R2009b:

Demo...Now...
sldemo_fuelsysUses enumerated data types and Simulink functions in the Stateflow chart to model control logic for the fuel rate control system

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS