Some issue is producing a CPU overload when executing a real-time application.
A CPU overload indicates that the CPU is unable to complete processing a model time step before restarting for the next time step.
When this error occurs, the Simulink Real-Time kernel halts model execution and the
object property TargetStatus shows an error, for example:
mCPUOverload: Sub-rate exception: Overload limit (0) exceeded in 0.02s rate with 1 overloads
If you allow the overload, model execution continues until the allowed overload limit is reached. If the model continues to run after a CPU overload, the time step lasts as long as the time required to finish the execution. This behavior delays the next time step.
Model design or target computer resources cause CPU overloads. Possible reasons are:
The target computer is too slow or the model sample time is too small.
The model is too complex (algorithmic complexity).
I/O latency, where each I/O channel used introduces latency into the system. I/O latency can cause the execution time to exceed the model time step.
To find latency values for Speedgoat boards, contact Speedgoat technical support.
The Simulink® Real-Time™ kernel usually halts model execution when it encounters a CPU overload. You can configure the Simulink Real-Time model to allow CPU overloads. Use this capability to support long initializations and for overload diagnosis.
For some real-time applications, normal initialization can extend beyond the first sample time. Use the SLRT Overload Options block to increase the number of startup time steps to ignore overloads. By default, only the first time step ignores overloads.
During execution, hardware-specific factors can cause the real-time application to
process data beyond the sample time. Use the
xPCMaxOverloadLen to diagnose and address this issue.
Allowing the target computer CPU to overload can cause incorrect results, especially for multirate models. Use the SLRT Overload Options block only for diagnosis. When your diagnosis is complete, turn off these options.