Skip to Main Content Skip to Search
Product Documentation

Version 7.5 (R2010a) Stateflow and Stateflow Coder Software

This table summarizes what's new in V7.5 (R2010a):

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:

Support for Combining Actions in State Labels

You can now combine entry, during, and exit actions in a single line on state labels. This concise syntax provides enhanced readability for your chart and helps eliminate redundant code. For more information, see Combining State Actions to Eliminate Redundant Code in the Stateflow User's Guide.

New Diagnostic Detects Unused Data and Events

A new diagnostic now detects unused Stateflow data and events during simulation. A warning message appears, alerting you to data and events that you can remove. This enhancement helps you reduce the size of your model by removing objects that have no effect on simulation.

This diagnostic checks for usage of Stateflow data, except for the following types:

This diagnostic checks for usage of Stateflow events, except for the following type:

For more information, see Diagnostic for Detecting Unused Data and Diagnostic for Detecting Unused Events in the Stateflow User's Guide.

Enhanced Support for Variable-Size Chart Inputs and Outputs

You can explicitly pass variable-size chart inputs and outputs as inputs and outputs of the following functions:

For more information, see Using Variable-Size Data in Stateflow Charts in the Stateflow User's Guide.

Support for Chart-Level Data with Fixed-Point Word Lengths Up to 128 Bits

Chart-level data now support up to 128 bits of fixed-point precision for the following scopes:

This increase in maximum precision from 32 to 128 bits provides these enhancements:

You can explicitly pass chart-level data with these fixed-point word lengths as inputs and outputs of the following functions:

For more information, see Using Fixed-Point Data in Stateflow Charts in the Stateflow User's Guide.

New 'States When Enabling' Property for Charts with Function-Call Input Events

The new chart property States When Enabling helps you specify how states behave when a function-call input event reenables a chart. You can select one of the following settings in the Chart properties dialog box:

This enhancement helps you more accurately control the behavior of a chart with a function-call input event. For more information, see Controlling States When Function-Call Inputs Reenable Charts and Setting Properties for a Single Chart in the Stateflow User's Guide.

Support for Tunable Structures of Parameter Scope in Charts

You can now define structures of parameter scope that are tunable. For more information, see Defining Structures of Parameter Scope in the Stateflow User's Guide.

Enhanced Real-Time Workshop Code Generation for Noninlined State Functions

If you prevent inlining for a state, Real-Time Workshop generated code contains a new static function inner_default_statename when:

For more information, see What Happens When You Prevent Inlining in the Stateflow User's Guide.

Enhanced Real-Time Workshop Code Generation for sizeof Function

When you use the sizeof function in generated code to determine vector or matrix dimensions, sizeof always takes an input argument that evaluates to a data type.

Behavior in Prior ReleasesBehavior in R2010aBenefits of Change in Code

Input argument references the address of the variable, for example:

sizeof(&a[0])

Input argument evaluates to the data type of the variable, for example:

sizeof(uint8_T [256])

Ensures consistent results between simulation and code generation.

Enhanced Real-Time Workshop Code Generation for Custom-Code Function Calls

When you use custom-code function calls in generated code, vector and matrix input arguments always use pass-by-reference instead of pass-by-value behavior.

Behavior in Prior ReleasesBehavior in R2010aBenefits of Change in Code

Custom-code function calls might use either pass-by-reference or pass-by-value.

For pass-by-value, a memcpy operation creates and stores a temporary variable in the generated code, for example:

int t[10];
for (i=0; i<10; i++) {
t[i] = y[i];
}
fcn(t);

Custom-code function calls use pass-by-reference, for example:

fcn(&y[0]);
  • Ensures consistent results between simulation and code generation.

  • Less memory usage because a temporary variable is not necessary.

  • Faster execution of generated code because a memcpy operation is not necessary.

Data Change Implicit Event No Longer Supports Machine-Parented Data

The implicit event change(data_name) no longer works for machine-parented data. In R2010a, this implicit event works only with data at the chart level or lower in the hierarchy.

Compatibility Considerations

For machine-parented data, consider using change detection operators to determine when data values change. For more information, see Detecting Changes in Data Values in the Stateflow User's Guide.

Support for Machine-Parented Events Completely Removed

Support for machine-parented events has been completely removed. In R2010a, an error message appears when you try to simulate models that contain events at the machine level.

Compatibility Considerations

To prevent undesired behavior for simulation and code generation, do not use machine-parented events. For simulation, broadcasting an event to all charts in your model causes the following to occur:

For code generation, machine-parented events prevent code reuse for the entire model.

MEX Compilation with Microsoft Visual Studio .NET 2003 No Longer Supported

Support for Microsoft Visual Studio® .NET 2003 as a MEX compiler for simulation has been removed because MATLAB and Simulink no longer support this compiler. For information about alternative compilers, see Choosing a Compiler in the Stateflow User's Guide.

Code Generation Status Messages No Longer Shown in Command Window

For Windows platforms, messages about Stateflow or Embedded MATLAB code generation and compilation status now appear only on the status bar of the Simulink Model Editor when you update diagram. Previously, these messages also appeared in the MATLAB Command Window. This enhancement minimizes distracting messages at the command prompt.

Change in Behavior for Appearance of Optimization Parameters

Previously, the Configuration Parameters dialog box showed the Stateflow section of the Optimization pane only when both of the following conditions were true:

In R2010a, the Configuration Parameters dialog box shows the Stateflow section of the Optimization pane when both licenses are available. Your model need not include any Stateflow charts or Embedded MATLAB Function blocks.

For a list of optimization parameters, see Optimization Pane: General in the Simulink Graphical User Interface.

Enhanced Inlining of Generated Code That Calls Subfunctions

In R2010a, Real-Time Workshop Embedded Coder software inlines generated code for Stateflow charts, even if the generated code calls a subfunction that accesses global Simulink data. This optimization uses less RAM and ROM.

Check Box for 'Treat as atomic unit' Now Always Selected

In existing models, simulation and code generation of Stateflow charts and Truth Table blocks always behave as if the Treat as atomic unit check box in the Subsystem Parameters dialog box is selected. Starting in R2010a, this check box is always selected for consistency with existing behavior.

New Demos

The following demos have been added in R2010a:

Demo...Shows how you can...
sf_combined_state_actionsCombine entry and during actions in a single line on state labels
sf_variable_size_dataPass variable-size data as an output of a Simulink function in a Stateflow chart
sf_multiword_fixptPass multiword fixed-point data as an input and an output of a Simulink function in a Stateflow chart

  


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