Stateflow User's Guide Previous page   Next Page

Modifying Output Data with Actions

If you are simulating a model with a control device such as a motor, the Stateflow diagram needs to hand over to Simulink some indication of the state that the motor is in to continue the simulation. You can imagine that such information might inform the model that the motor is on and now providing cooling or heating to the model, or that the motor is off and plant temperature or pressure is increasing accordingly.

Use the following procedure topics to output modified data from the Controller Stateflow diagram to the Simulink test interface:

  1. Adding State Entry Actions -- Program the Controller Stateflow diagram to modify data from Simulink in the entry action of the active state.
  2. Adding Output Data to the Stateflow Chart -- Pass Stateflow modified data from the Controller diagram to the Simulink model.
  3. Sending Stateflow Output Data to Simulink -- Receive modified data from the Controller Stateflow diagram in the Simulink model and display it.

Previous page  Sending Multiple Trigger Events to a Stateflow Chart Adding State Entry Actions Next page

© 1994-2005 The MathWorks, Inc.