Prev Next

Stateflow Integration

A significant feature when using Enterprise Architect's SysML simulation is the ability to generate MATLAB Stateflow diagrams to be run under Simulink, allowing you to guide your SysML simulations using StateMachines modeled in Enterprise Architect that are translated to Stateflow diagrams.

The Stateflow diagrams use elements and connectors that have close equivalents to the OMG StateMachine standard, such as States and Transitions. Enterprise Architect supports all the Stateflow features, however Stateflow only uses a subset of the OMG StateMachine standards.

This is an example of a StateMachine diagram in Enterprise Architect:

This is an example of how the code generated by Enterprise Architect, from the diagram above,  is rendered as a Stateflow diagram:

Supported Element Types

The SysML element ttypes that can be translated to StateFlow objects are:

  • State
  • Initial
  • Final
  • Junction
  • Choice  (converted to Stateflow Junction)
  • History

Supported Connector Types

The key SysML StateMachines connector type does have a direct translation to the Simulink connector type:

  • Transition

Learn more