Stateflow    

Adding Input Data from Simulink

The following steps describe how to add a data input from Simulink to a Stateflow chart in Stateflow Explorer:

  1. Add a data object to the chart using the Stateflow diagram editor or Stateflow Explorer (see Adding Data to the Data Dictionary).
  1. You must add the data to the chart and not to any other object in the chart. Adding a data object with the Stateflow diagram editor adds it only to the chart that is visible in the diagram editor. In Stateflow Explorer, you must select (highlight) the chart object in the hierarchy shown in the left pane of the Explorer before adding the event.

  1. Set the data object's Scope to Input from Simulink from the resulting menu.
  1. A single Simulink data input port is added to the side of the Stateflow block. When you add a data input, each data input is represented on the Stateflow block by a Simulink input port. Multiple data inputs to the Stateflow block must be scalar (they cannot be vectorized).

  1. Specify the remaining properties for the data.

If you choose to add data in the Stateflow Explorer, you can also change some of its properties directly in the Explorer (see Setting Properties for Data, Events, and Targets).


  Adding Output Events to Simulink Adding Output Data to Simulink