Stateflow | ![]() ![]() |
Outputting Data to Simulink
These tasks describe how to add and define the necessary fields for a data output to Simulink:
Output to Simulink
as the Scope
Add a Data Object Parented by the Chart
These steps describe how to add a data object:
Choose Output to Simulink as the Scope
Once you have chosen the chart as the parent, the choice of valid scopes includes Local
, Input from Simulink
, or Output to Simulink
.
Choose Output to Simulink
as the Scope
of the data.
When you define a data object to be an Output to Simulink
, a Simulink output port is added to the Stateflow block. Output data objects from the Stateflow block to the Simulink model are scalar.
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 output port corresponding to this output data item to emit 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 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.
![]() | Outputting Events to Simulink | MATLAB Workspace | ![]() |