Set Simulink Based State Properties
Simulink® based states are Simulink subsystems within a Stateflow® state that enable you to model systems that switch between periodic or continuous time dynamics. For more information, see Simulink Subsystems as States.
You can specify properties for a Simulink based state in the Property Inspector, the Model Explorer, or the Simulink based state properties dialog box.
To use the Property Inspector:
In the Modeling tab, under Design Data, select Property Inspector.
In the Stateflow Editor, select the Simulink based state.
In the Property Inspector, edit the properties of the Simulink based state.
To use the Model Explorer:
In the Modeling tab, under Design Data, select Model Explorer.
In the Model Hierarchy pane, select the Simulink based state.
In the Dialog pane, edit the properties of the Simulink based state.
To use the Simulink Based State properties dialog box:
In the Stateflow Editor, right-click the Simulink based state.
In the properties dialog box, edit the Simulink based state properties.
You can also specify Simulink based state properties programmatically by using
Stateflow.SimulinkBasedState objects. For more information about the
Stateflow programmatic interface, see Overview of the Stateflow API.
Simulink Based State Properties
Create data for monitoring self activity
Creates a data output port on the Stateflow block for this self-activity of the state.
Log self activity
Logs the state self-activity. View the activity of the state in the Simulation Data Inspector.
Specify the signal logging name. To create a signal logging name that is
different from the state name, choose
Custom, and add
Sets the Simulink based state as a Stateflow test point. For more information, see Monitor Test Points in Stateflow Charts.
Limit data points to last
Maximum number of data points to log. Default value is 5000, which means the chart logs the last 5000 data points generated by the simulation.
Decimation interval limits the amount of data logged by skipping samples. Default value is 2, which means the chart logs every other sample.
Specify the code format generated for a Simulink based state. You can set the format to one of these options:
Auto — Simulink Coder™ software chooses the optimal format for you based on the type and number of instances of the subsystem that exist in the model.
Inline — Simulink Coder software inlines the subsystem unconditionally.
Nonreusable function — Simulink Coder software explicitly generates a separate function in a separate file.
Reusable function — Simulink Coder software generates a function with arguments that allows reuse of Simulink based state code when a model includes multiple instances of the Simulink based state.
For more information, see Function packaging (Simulink).
Description of the Simulink based state.
Link to online documentation for the Simulink based state. You can enter a web URL address or a MATLAB® command that displays documentation as an HTML file or as text in the MATLAB Command Window. When you click the Document link hyperlink, Stateflow evaluates the link and displays the documentation.
- Model Explorer (Simulink)