Using Stateflow     Search    Help Desk 

Data Outputs to Simulink

These tasks describe how to add and define the necessary fields for a data output to Simulink:

Add a Data Object Choosing a Chart as the Parent

These steps describe how to add a data object:

   1.
Choose Explore from the graphics editor Tools menu to invoke the Explorer.
   2.
Select a chart object in the hierarchy that you want to be the data object's parent.
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.
   3.
Choose Data from the Explorer Add menu. The Data properties dialog box is displayed.
   4.
Enter a name in the Name field.

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 to enable access rights to Simulink and any offspring of the chart.

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.

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.



[ Previous | Help Desk | Next ]