Main Content

Absolute Time Limitations

Absolute time is the time that has elapsed from the beginning of program execution to the present time, as distinct from elapsed time, the interval between two events. See Absolute and Elapsed Time Computation for more information.

When you design an application that is intended to run indefinitely, you must take care when logging time values, or using charts or blocks that depend on absolute time. If the value of time reaches the largest value that can be represented by the data type used by the timer to store time, the timer overflows and the logged time or block output is incorrect.

If your target uses rtModel, you can avoid timer overflow by specifying a value for model configuration parameter Application lifespan. See Integer Timers in Generated Code for more information.

The following limitations apply to absolute time:

  • If you log time values by selecting model configuration parameter Time, your model uses absolute time.

  • Every Stateflow® chart that uses time is dependent on absolute time. The only way to eliminate the dependency is to change the Stateflow chart to not use time.

  • A subset of Simulink® blocks depend on absolute time. For a list of the blocks in that subset, see Blocks That Depend on Absolute Time. Blocks in other blocksets might depend on absolute time. See the documentation for the blocksets that you use.

Related Topics