Stateflow User's Guide Previous page   Next Page

Adding Output Data to the Stateflow Chart

In Adding State Entry Actions, you modify the data speed in state entry actions that you intend to pass to the Simulink model. Before you can use speed as data in the Controller diagram, you must define it to the Controller diagram as data passed to the Simulink model.

Use the following steps to define the data speed as output to Simulink for the Controller Stateflow diagram:

  1. In the Stateflow diagram editor for the Controller block, from the Add menu, select Data.
  2. In the resulting submenu, select Output to Simulink.
  1. The property dialog for the new data appears.

  1. In the Name field of the data properties dialog, enter speed.
  2. Click OK to apply the changes and close the window.
  1. An output port for the data speed now appears on the right side of the Controller Stateflow block in the Simulink model as shown.


Previous page  Adding State Entry Actions Sending Stateflow Output Data to Simulink Next page

© 1994-2005 The MathWorks, Inc.