|On this page…|
Use the Simulation Stepping Options dialog box to configure the time and the manner of manually stepping through a simulation.
This pane appears when you select Simulation > Stepping Options.
Set the time at which you wish to pause the simulation
To step backwards through a simulation, select Enable stepping back and specify the total number and frequency of snapshots.
Specify the increment of steps by which the simulation steps either forward or backwards.
To pause simulation at a particular time, select Pause simulation when time reaches check box and enter the pause time.
To start the Simulation Stepping Options dialog box from the Simulink® toolbar, click .
You can change the value while the simulation is running or paused.
Enable stepping back.
Simulation stepping (forward and back) is available only for Normal and Accelerator modes.
This parameter enables the Maximum number of saved back steps and Interval between stored back steps parameters.
Enter the maximum number of snapshots that the software can capture. A snapshot at a particular simulation time captures all the information required to continue a simulation from that point.
Enable stepping back enables this parameter and the Interval between stored back steps parameter.
Enter the number of major time steps to take between capturing simulation snapshots.
The number of steps to skip between snapshots. This parameter enables you to save snapshots of simulation state for stepping backward at periodic intervals, such as every three steps forward. This interval is independent of the number of steps taken in either the forward or backward direction. Because taking simulation snapshots affects simulation speed, saving snapshots less often can improve simulation speed.
Enable stepping back enables this parameter and the Maximum number of saved back steps parameter.
Enter the number of major time steps for a single call to step forward or back.
The maximum number of steps, or snapshots, to capture while simulating forward. The greater the number, the more memory the simulation occupies and the longer the simulation takes to run.
Pause simulation when time reaches the specified time(s).
Selecting this check box enables the associated text box. In this text box, enter the time at which simulation is to be paused.
This value can be a scalar value, or a vector of times. Specifying a vector of pause times is equivalent to specifying multiple separate pause times for a single simulation.
You can specify pause times as variables in the model or MATLAB® workspace.
The stepper does not alter the course of the simulation. As a consequence, specifying a value for a pause time does not necessarily pause the simulation at exactly that time. Instead, the simulation pauses at whatever simulation time is closest to the requested pause time, without going below it.