Stateflow | ![]() ![]() |
Inputting Data from Simulink
These tasks describe how to add and define the necessary fields for a data input from Simulink:
Input from Simulink
as the Scope
Add a Data Object Choosing a Chart as the Parent
These steps describe how to add a data object:
You must explicitly choose a parent to create a data object. Choosing the Chart to be the parent determines that the data resides within the chart.
Choose Input from Simulink as the Scope
Once you have chosen the chart as the parent, the choice of valid scopes includes Local
, Input from Simulink
, Output to Simulink
, Temporary
, or Constant
.
Choose Input from Simulink
as the Scope
to enable access rights to Simulink and any offspring of the chart.
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).
Specify Data Attributes
If you want to change the defaults, you can specify data Units, Type, Initial, Minimum, and Maximum values.
Note
If you want the input port corresponding to this input data item to accept Simulink data of type other than double , you must select the chart's strong data typing option. See Defining Input Data and Specifying Chart Properties for more information.
|
Apply and Save the Changes
Click on the Apply button to save the properties. Click on the OK button to save the properties and close the dialog box.
![]() | Inputting Events from Simulink | Outputting Events to Simulink | ![]() |