| Contents | Index |
When your model contains Stateflow charts in addition to SimEvents blocks, you must follow these rules:
Insert a Timed to Event Signal gateway block between Stateflow output and SimEvents input.
If the chart is capable of propagating its execution context, select this option as follows:
Select the Stateflow block and choose Edit > Subsystem Parameters from the model window's menu bar.
In the dialog box that opens, select Propagate execution context across subsystem boundary if it appears and click OK. If this parameter does not appear in the dialog box, just click OK.
If an output of the chart connects to a SimEvents block, do not configure the chart to be entered at initialization. To ensure that this configuration is correct,
Select the File > Chart Properties from the chart window's menu bar.
In the dialog box that opens, clear Execute (enter) Chart At Initialization and click OK. This check box is cleared by default.
When you design default transitions in your chart, keep in mind that the chart will not be entered at initialization. For example, notice that the default transition in the example in Example: Failure and Repair of a Server indicates the state corresponding to the first actual event during the simulation, not an initial state.
If the chart has an output signal, you can provide a nonzero initial output using the Initial Value block as in Specifying Initial Values of Event-Based Signals. Because the chart is not entered at initialization, you cannot use the chart itself to provide a nonzero initial output.
![]() | Role of Stateflow Charts in SimEvents Models | Examples Using Stateflow Charts and SimEvents Blocks | ![]() |

Learn how you can use SimEvents discrete-event simulation capabilities through these technical resources.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |