| Aerospace Blockset™ | ![]() |
Animation/Animation Support Utilities

The Simulation Pace block lets you run the simulation at the specified pace so that connected animations appear aesthetically pleasing.
This block does not product deployable code.
Use the Sample time parameter to set how often the Simulink® interface synchronizes with the wall clock.
The sample time of this block should be considered for human interaction with visualizations. The default is 1/30th of a second, chosen to correspond to a 30 frames-per-second visualization rate (typical for desktop computers).
Caution Choose as slow of a sample time as needed for smooth animation, since oversampling has little benefit and undersampling can cause animation "jumpiness" and potentially block the MATLAB® main thread on your computer. |

Specifies the ratio of simulation time to clock time. The default is 1 second of simulation time per second of clock time.
Setting the Sleep mode parameter to off lets you disable the pace functionality and run as fast as possible.
If you select this check box, the block outputs the "pace error" value (simulationTime minus ClockTime), in seconds. The pace error is positive if the simulation is running faster than the specified pace and negative if slower than the specified pace.
Specify the sample time (-1 for inherited). Larger sample times result in more efficient simulations, but less smooth in output pace when there are multiple Simulink time steps between pacer block samples. If the Sample time is too large, the MATLAB interface may become less responsive as MATLAB and Simulink calculations are blocked from running when the block puts the MATLAB interface to sleep.
The block optionally outputs the "pace error" value (simulationTime minus ClockTime), in seconds. The pace error is positive if the simulation is running faster than the specified pace and negative if slower than the specified pace.
Outputting the pace error from the block lets you record the overall pace achieved during the simulation or routing the signal to other blocks to make decisions about the simulation if the simulation is too slow to keep up with the specified pace.
The simulation pace is implemented by putting the entire MATLAB thread to sleep until it needs to run again to keep up the pace. The Simulink software is single threaded and runs on the one MATLAB thread, so only one Simulation Pace block can be active at a time.
See the asbhl20 demo for an example of this block.
![]() | Simple Variable Mass 6DoF Wind (Wind Angles) | SinCos | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |