| Version 7.1 (R2008a) Stateflow® and Stateflow® Coder™ Software Release Notes | ![]() |
This table summarizes what's new in V7.1 (R2008a):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | Yes—Details labeled as Compatibility Considerations, below. See also Summary | Bug
Reports | Printable Release Notes: PDF |
New features and changes introduced in this version are:
Bidirectional Traceability for Navigating Between Generated Code and Stateflow® Objects
New Temporal Logic Notation for Defining Absolute Time Periods
New temporalCount Operator for Counting Occurrences of Events
Code Optimization for Simulink® Blocks and Stateflow® Charts
New fitToView Method for Zooming Objects in the Stateflow® Editor
New Fixed-Point Details Display in the Data Properties Dialog
"What's This?" Context-Sensitive Help Available for Simulink® Configuration Parameters Dialog
Enhanced Warning Message for Target Hardware that Does Not Support the Data Type in a Chart
Detection of Division-By-Zero Violations When Debugger Is Off
Stateflow® charts support data with complex data types. You can perform basic arithmetic (addition, subtraction, and multiplication) and relational operations (equal and not equal) on complex data in Stateflow action language. You can also use complex input and output arguments for Embedded MATLAB™ functions in your chart.
For more information, see Using Complex Data in Stateflow® Charts in the Stateflow and Stateflow® Coder™ User's Guide.
You can specify more than one output argument in graphical functions, truth table functions, and Embedded MATLAB functions. Previously, you could specify only one output for these types of functions.
For more information, see Using Graphical Functions to Extend Actions, Truth Table Functions, and Using Embedded MATLAB™ Functions in the Stateflow and Stateflow Coder User's Guide.
In previous releases, Real-Time Workshop® Embedded Coder™ software provided bidirectional traceability only for Simulink blocks. In R2008a, bidirectional traceability works between generated code and Stateflow objects.
For embedded real-time (ERT) based targets, you can choose to include traceability comments in the generated code. Using the enhanced traceability report, you can click hyperlinks to go from a line of code to its corresponding object in the model. You can also right-click an object in your model to find its corresponding line of code.
For more information, see Traceability of Stateflow® Objects in Generated Code in the Stateflow and Stateflow Coder User's Guide and Creating and Using a Code Generation Report in the Real-Time Workshop Embedded Coder User's Guide.
You can use a keyword named sec to define absolute time periods based on simulation time of your chart. Use this keyword as an input argument for temporal logic operators, such as after.
For more information, see Using Temporal Logic in State Actions and Transitions in the Stateflow and Stateflow Coder User's Guide.
You can use the temporalCount operator to count occurrences of explicit or implicit events. This operator can also count the seconds of simulation time that elapse during chart execution.
For more information, see Using Temporal Logic in State Actions and Transitions and Counting Events in the Stateflow and Stateflow Coder User's Guide.
When you use the in operator to check state activity, you must use a specific path to a state. The operator performs a localized search for states that match the given path by looking in each level of the Stateflow hierarchy between its parent and the chart level. The operator does not do an exhaustive search of all states in the entire chart. If there are no matches or multiple matches, a warning message appears and chart execution stops. The search algorithm must find a unique match to check for state activity.
For more information, see Checking State Activity in the Stateflow and Stateflow Coder User's Guide.
Previously, you could use a non-specific path to a state as the argument of the in operator, because the operator performed an exhaustive search for all states in the chart that match the given path. In the case of multiple matches, a filtering algorithm broke the tie to produce a unique state for checking activity. This behavior has changed. Stateflow charts created in earlier versions may now generate errors if they contain an in operator with a non-specific path to a state.
Stateflow Coder software detects missing else statements in if-else structures for generated code. This enhancement supports MISRA C® rule 14.10.
Code files for simulation and code generation targets now reside in the slprj directory. Previously, generated code files resided in the sfprj directory.
For more information, see Generated Code Files for Targets You Build in the Stateflow and Stateflow Coder User's Guide.
In R2008a, Real-Time Workshop® code generation is enhanced to enable cross-product optimizations between Simulink® blocks and Stateflow charts.
You can use the API object method fitToView to zoom in on graphical objects in the Stateflow Editor.
For more information, see Zooming a Chart Object Using the Stateflow® API in the Stateflow and Stateflow Coder User's Guide.
If you copy and paste a state in the Stateflow Editor, a unique name automatically appears for the new state.
For more information, see Copying Objects in the Stateflow and Stateflow Coder User's Guide.
In the Stateflow Editor, the font sizes in the Edit > Set Font Size menu now include 2-point, 4-point, and 50-point. These font options are also available by right-clicking a text item and choosing Font Size from the context menu.
For more information, see Specifying Colors and Fonts in the Stateflow and Stateflow Coder User's Guide.
The Data Type Assistant in the Data properties dialog now displays status and details of fixed-point data types.
For more information, see Showing Fixed-Point Details in the Stateflow and Stateflow Coder User's Guide.
R2008a introduces "What's This?" context-sensitive help for parameters that appear in the Simulink Configuration Parameters dialog. This feature provides quick access to a detailed description of the parameters, saving you the time it would take to find the information in the Help browser.
To use the "What's This?" help, do the following:
Place your cursor over the label of a parameter.
Right-click. A What's This? context menu appears.
For example, the following figure shows the What's This? context menu appearing after a right-click on the Start time parameter in the Solver pane.

Click What's This? A context-sensitive help window appears showing a description of the parameter.
When you define a fixed-point data type in a Stateflow chart, you must specify scaling explicitly in the General pane of the Data properties dialog. For example, you cannot enter an incomplete specification such as fixdt(1,16) in the Type field. If you do not specify scaling explicitly, you will see an error message when you try to simulate your model.
To ensure that the data type definition is valid for fixed-point data, perform one of these steps in the General pane of the Data properties dialog:
Use a predefined option in the Type drop-down menu.
Use the Data Type Assistant to specify the Mode as fixed-point.
For more information, see Defining Data in the Stateflow and Stateflow Coder User's Guide.
Previously, you could omit scaling in data type definitions for fixed-point data. Such data types were treated as integers with the specified sign and word length. This behavior has changed. Stateflow charts created in earlier versions may now generate errors if they contain fixed-point data with no scaling specified.
If you enable the option Execute (enter) Chart At Initialization in the Chart properties dialog, you cannot assign data store memory data in state entry actions and default transitions that execute the first time that the chart awakens. You can use data store memory data in state during actions, inner transitions, and outer transitions without any limitations.
Previously, assigning data store memory in state entry actions and default transitions with this option enabled would cause a segmentation violation.
If your target hardware does not support the data type you use in a Stateflow chart, a warning message appears when you generate code for that chart. This message appears only if the unsupported data type is present in the chart.
Previously, a warning message appeared if the target hardware did not support a given data type, even when the unsupported data type was not actually used in the chart.
Stateflow simulation now detects division-by-zero violations in a chart, whether or not you enable the debugger.
Previously, disabling the debugger would prevent detection of division-by-zero violations, which caused MATLAB® sessions to crash.
![]() | Stateflow® and Stateflow® Coder™ Release Notes | Version 7.0 (R2007b) Stateflow® and Stateflow® Coder™ Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |