| Using Stateflow | Search  Help Desk |
Waking Up Charts
Stateflow lets you specify the method by which a simulation updates (wakes up) a chart. To specify a wake up method for a chart, set the chart's Update method property (see "Specifying Chart Properties") to one of the following options:This is the default update method. Specifying this method causes inputs from the Simulink model to determine when the chart wakes up during a simulation. If you define input events for the chart (see "Defining Input Events"), the chart awakens when trigger signals appear on the chart's trigger port. If you define data inputs (see "Defining Input Data") but no event inputs, the chart awakens at the rate of the fastest data input. If you do not define any inputs for the chart, the chart wakes up at the model's solver sample rate.
Simulink awakens (samples) the Stateflow block at the rate you specify as the block's Sample Time property. An implicit event is generated by Simulink at regular time intervals corresponding to the specified rate. The sample time is in the same units as the Simulink simulation time. Note that other blocks in the Simulink model may have different sample times.
The Stateflow block wakes up at each step in the simulation, as well as at intermediate time points that may be requested by the Simulink solver.