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.
The following Simulink® blocks depend on absolute time:
Discrete-Time Integrator (only when used in triggered subsystems)
Sine Wave (only when the Sine type parameter is set to
Time-based
)To Workspace (only when logging to
StructureWithTime
format)
In addition to the Simulink blocks above, blocks in other blocksets may depend on absolute time. See the documentation for the blocksets that you use.