| Version 5.0 (R13) Stateflow® and Stateflow® Coder™ Software Release Notes | ![]() |
This table summarizes what's new in V5.0 (R13):
| 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. | Fixed Bugs | Printable Release Notes: PDF |
New features and changes introduced in this version are:
Stateflow software now supports fixed-point data with the following features:
Support for fixed-point data with both binary point scaling and slope and bias scaling
Support for fixed-point operations included comparison, addition, subtraction, multiplication, and division
Full coupling with input from and output to Simulink models
Detection of overflow for fixed-point and integer types
Convenient notation for expressing fixed-point literal constants in action language
Automatic type promotion rules that select the default result type of an operation for maximum computational efficiency
Full control for overflow prevention and precision retention using special := assignment operator
This feature is documented in in the Stateflow and Stateflow Coder User's Guide.
You can now use two-dimensional matrices of any type for data with the scope Data input from Simulink or Data output to Simulink.
This feature is documented in Adding Data in the Stateflow and Stateflow Coder User's Guide.
You can use a new data type called ml. Data of this type is typed internally with the MATLAB type mxArray. This means that you can assign (store) any type of data available in a Stateflow chart to a data of type ml. This includes any type of data defined in a Stateflow chart or returned from the MATLAB workspace with the ml namespace operator or ml function.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
Stateflow software now supports vector arrays and n-dimensional matrices as arguments and return values for the matlab (ml for short) namespace operator and matlab (ml for short) function call. Before, only scalar data was supported.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
You can now define up to 254 events per chart. The previous maximum was 127. If your chart has more than 254 events, an error message appears.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
The new Stateflow API provides programmatic access to Stateflow objects. Through individual MATLAB commands or scripts of commands, you can manipulate Stateflow objects (machines, charts, states, boxes, functions, notes, transitions, junctions, data, events, and targets) to perform actions previously available only through Stateflow graphical interfaces. These actions include constructing new charts from scratch and modifying existing ones.
The Stateflow API provides control for the following Stateflow actions:
Search for and find existing Stateflow objects, including charts, at any level of containment
Set the triggering behavior of new or existing charts
Create new Stateflow objects within charts with complete control over their positioning, scope, containment, and decomposition (states)
Set the properties for all Stateflow objects
Copy and paste Stateflow objects from one location to another
Delete existing Stateflow objects
Modify the graphical appearance of all Stateflow objects
Parse Stateflow charts
Change the debugging (simulation) behavior for simulation targets
Build Stateflow simulation targets
Change the deployment properties for Stateflow nonsimulation targets
Build, compile, or generate code for other targets including embedded targets
This feature is documented in Using the API in the Stateflow API documentation.
Any chart or library chart can now export a graphical function and any other chart or library chart can call it, as long as the caller and the called are both accessible through the same main model.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
Stateflow action language now recognizes a trailing F for specifying single-precision floating-point numbers, as in the action statement x = 4.56F;. In Stateflow action language, if a trailing F does not appear with a number, it is assumed to be double-precision. Specifying single-precision numbers allows you to save memory in generated code.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
Transition actions for transitions into junctions with condition actions that follow as part of a state-to-state path are now flagged by an error. The error indicates that the execution of these actions is in reverse order to the apparent segment order in the chart.
Compatibility Considerations. You can modify existing code using the workaround documented in the Stateflow and Stateflow Coder User's Guide.
You can include comments you enter in the action language of Stateflow charts in generated code for embedded and custom targets. This option is enabled by default.
This feature is documented in Building Targets in the Stateflow and Stateflow Coder User's Guide.
The Stateflow code generator detects and emits for-loops when applicable. In previous versions, the code generator always emitted while-loops.
The code generated for Stateflow blocks is seamlessly integrated with code generated for other Simulink blocks, leading to more efficient and readable code.
Graphical functions with I/O can now be inlined in the generated code. You can specify inlining behavior (auto, force inline, force no inline) for every graphical function via its property dialog box. auto refers to a default strategy in which the Stateflow Coder code generation software decides when it is advantageous to inline a graphical function.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
When possible, Simulink input and output data to a Stateflow chart are made local, reducing RAM size. Whenever possible, these local inputs are conditionally evaluated (via expression folding) resulting in execution speed improvements.
Unnecessary data initialization statements are now removed from the code generated for graphical functions.
A simple Boolean expression evaluation scheme is used to optimize if statements such as if(1), if(0), if(ON==OFF).
You can undo and redo operations you perform in the Stateflow Editor. When you undo an operation, you reverse the last edit operation you performed. After you undo operations, you can also redo them one-at-a-time. When you place your mouse cursor over the Undo or Redo buttons, the tooltip that appears indicates the nature of the operation to undo or redo.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
A new model report is available for making comprehensive reports of Stateflow objects. Make this report in the Stateflow Editor by selecting Print Details from the File menu.
This feature is documented in the Stateflow and Stateflow Coder User's Guide.
Stateflow Explorer now remembers its position and size across sessions.
![]() | Version 5.1 (R13+) Stateflow and Stateflow Coder Software | Version 4.1 (R12.1) Stateflow and Stateflow Coder Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |