Stateflow    

Defining Input Data

Stateflow allows a model to supply data to a chart via input ports on the chart's block. Such data is called input data. To define an item of input data, add a default item to the Stateflow data dictionary as a child of the chart that will input the data. Set the new item's scope to Input from Simulink. Stateflow adds an input port to a chart for each item of input data that you define for the chart.

Set the item's other properties (for example, Name, Type, and so on) to appropriate values.

You can set an input item's data type to any Stateflow-supported type. You can set the size of the input data to be scalar, vector, or two-dimensional array (see Defining Data Arrays). If the chart's strong data typing option is enabled (see Specifying Chart Properties), input signals must match the specified type. Otherwise, a mismatch error occurs. If strong data typing is not enabled, input signals must be of type double. In this case, Stateflow converts the input value to the specified type. If the input item is a vector, the model must supply the data via a signal vector connected to the corresponding input port on the chart.


  Defining Data Arrays Defining Output Data