RealTime Pacer

Slow down a simulation to track real (i.e., wall clock) elapsed time.

Description

The RealTime Pacer block slows down ("paces") simulation time to track real elapsed time. The degree of slowdown is controllable via the Speedup parameter. To use this block, copy it anywhere in your model (it does not need to be at the top level).

Some points to keep in mind when using the RealTime Pacer block:

  1. The block relies on slowing down a simulation to make it match real time. If your model involves a lot of computation so that 1 second of simulation time requires more than 1 second of real time, this block will not have any effect.
  2. The block uses the MATLAB PAUSE function to slow down the simulation. The PAUSE command gives up the processor during the pause, so system performance does not degrade.
  3. The matching between simulation time and elapsed real time is approximate, with expected differences on the order of 10 to 30 milliseconds. This limitation is due to difficulties of precise timing with a multitasking operating system.
  4. The block does not support code generation.
The RealTime Pacer block works on all supported Simulink platforms.

Parameters

Speedup

Speedup specifies the ratio between simulation time and real time.

Inputs and Outputs

None.