Skip to Main Content Skip to Search
Product Documentation

Version 7.8 (R2011b) Stateflow Software

This table summarizes what's new in V7.8 (R2011b):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known Problems
Yes
Details below
Yes—Details labeled as Compatibility Considerations, below. See also Summary.

Bug Reports
Includes fixes

New features and changes introduced in this version are:

Chart Property to Control Saturation for Integer Overflow

A new chart property, Saturate on integer overflow, enables you to control the behavior of data with signed integer types when overflow occurs. The check box appears in the Chart properties dialog box.

Check BoxWhen to Use This SettingOverflow HandlingExample of a Result
SelectedOverflow is possible for data in your chart and you want explicit saturation protection in the generated code.Overflows saturate to either the minimum or maximum value that the data type can represent. An overflow associated with a signed 8-bit integer saturates to –128 or +127.
ClearedYou want to optimize efficiency of the generated code.The behavior depends on the C compiler you use for generating code.The number 130 does not fit in a signed 8-bit integer and wraps to –126.

Arithmetic operations for which you can enable saturation protection are:

For new charts, this check box is selected by default. When you open charts saved in previous releases, the check box is cleared to maintain backward compatibility.

For more information, see Handling Integer Overflow for Chart Data in the Stateflow User's Guide.

Enhanced User Interface for Logging Data and States

A new Logging tab on the Data and State properties dialog boxes enables you to log signals in the same way that you do in Simulink. For more information, see Logging Data Values and State Activity in the Stateflow User's Guide.

Control of Default Case Generation for Switch-Case Statements in Generated Code

You can specify whether or not to always generate default cases for switch-case statements. This optimization works on a per-model basis and applies to the code generated for a state that has multiple substates. Use the following check box on the Code Generation > Code Style pane of the Configuration Parameters dialog box:

Check BoxWhen to Use This SettingFormat of Switch-Case Statements
SelectedProvide better code coverage by ensuring that every branch in the generated code is falsifiable.Exclude the default case when it is unreachable.
ClearedEnsure MISRA C® compliance and provide a fallback in case of RAM corruption.Always include a default case.

This readability optimization is available for embedded real-time (ERT) targets and requires a license for Embedded Coder™ software. For new models, this check box is cleared by default. When you open models saved in previous releases, the check box is also cleared to maintain backward compatibility.

For more information, see Code Generation Pane: Code Style in the Embedded Coder Reference documentation.

Detection of State Inconsistency Errors at Compile Time Instead of Run Time

In R2011b, you can detect inconsistency errors earlier in the model development process. If you select Edit > Update Diagram in the Simulink Editor, you get an error when Stateflow statically detects that there are no active children during execution of a chart or a state.

Compatibility Considerations

In previous releases, static detection of these inconsistency errors did not occur until run time.

Ability to Model Persistent Output Data for Mealy and Moore Charts

In previous releases, Mealy and Moore charts automatically applied the initial value of outputs every time the chart woke up. Both chart types ensured that outputs did not depend on previous values of outputs by enforcing the chart property Initialize Outputs Every Time Chart Wakes Up.

In R2011b, this restriction has been lifted. You can now choose whether or not to initialize outputs every time a Mealy or Moore chart wakes up. If you disable this chart property, you enable latching of outputs (carrying over output values computed in previous time steps). This enhancement enables you to model persistent output data for Mealy and Moore charts.

For more information, see Building Mealy and Moore Charts in the Stateflow User's Guide.

Control of Diagnostic for Multiple Unconditional Transitions from One Source

You can control the behavior of the Stateflow diagnostic that detects multiple unconditional transitions from the same state or the same junction. Set Transition shadowing to none, warning, or error on the Diagnostics > Stateflow pane of the Configuration Parameters dialog box.

For more information, see Diagnostics Pane: Stateflow in the Simulink Graphical User Interface documentation.

MEX Compilation with Microsoft Windows SDK 7.1 Now Supported

You can use Microsoft® Windows® Software Development Kit (SDK) 7.1 as a MEX compiler for simulation on 32- and 64-bit Windows machines. For a list of supported compilers, see Choosing a Compiler in the Stateflow User's Guide.

Simulation Supported When the Current Folder Is a UNC Path

In R2011b, you can simulate models with Stateflow blocks when the current folder is a UNC path. In previous releases, simulation of those models required that the current folder not be a UNC path.

Removal of the Coverage Tab from the Stateflow Debugger

In R2011b, the Coverage tab of the Stateflow debugger has been removed. In previous releases, clicking the Coverage tab would show the following message:

Coverage feature obsoleted. Please use Simulink Verification and Validation in order to get complete coverage of Simulink/Stateflow objects.

Test Point Selection Moved to the Logging Tab in Properties Dialog Boxes

The Test point check box has moved from the General tab to the Logging tab on State and Data properties dialog boxes.

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS