|On this page…|
Stateflow® can provide state activity data through an output port to Simulink®. You can use active state output for a Stateflow chart, state, state transition table, or atomic subchart.
You enable active state output by selecting Create output port for monitoring in the Properties window of Stateflow object in the Stateflow Editor.
The following chart defines the levels of activity supported for each Stateflow object that has active state output available.
|Stateflow Object||Self Activity||Child Activity|
|Atomic subcharts||Supported at the container level||Supported inside the subchart|
|State transition tables||Not supported||Supported|
When you use active state output, an output port is created on the Stateflow block in Simulink.
|Mode||Output Data Type||Description|
|Self Activity||Boolean||Is the state active?|
|Child Activity||Enumeration||Which child is active?|
If monitoring self activity of a chart or state, the data value is 1 when active and 0 when inactive. For monitoring child activity, the data is an enumerated type that can be automatically or custom managed. For more information about the enumeration type, see Define the Enum Name and Type.