What is the meaning of the task overrun detected output?
Afficher commentaires plus anciens
After code-generating my Simulink model to a deployed executable and running it on in a Linux environment, I receive the following messages printed out over stdout:
"Overrun detected: The sample time for the rate 0 is too short."
My model is a multi-rate model and each rate group is as follows:
- Discrete 1: 0.0005 (2 kHz)
- Discrete 2: 0.004 (250 Hz)
- Discrete 3: 0.032 (~31 Hz)
- Discrete 4: 0.128
- Discrete 5: 0.512
- Discrete 6: 3.072
My question is two-fold:
- Does "rate 0" (from the error message) refer to the base rate of the model?
- Why can't this output be more specific and tell me what part of the model is executing when the overrun occurs?
My question is not about how to fix task overruns (just the above), so please refrain from linking me to posts/articles that tell me to increase my sample time, etc.
Thanks, Tyler
4 commentaires
Walter Roberson
le 3 Nov 2017
Do you have any continuous blocks? Those would have timestep 0
Tyler
le 3 Nov 2017
Walter Roberson
le 3 Nov 2017
I am not clear about whether you are getting the message at code generation time, or at the time you run the model?
Are you generating to Arduino, or to Simulink Real-Time with PIL or SIL ?
Réponse acceptée
Plus de réponses (1)
Fangjun Jiang
le 3 Nov 2017
1 vote
In your Simulink model, go to menu Display->Sample Time->All. A legend of various sample times will be shown. Hopefully, you can find the one in question.
2 commentaires
Tyler
le 3 Nov 2017
Fangjun Jiang
le 3 Nov 2017
Okay. I think the "0" here in "rate 0" might be an ID, not the actual value. You have six rates here so it will be "rate 0" to "rate 5". "rate 0" refers to the fastest rate. Otherwise, it does not make sense. If the rate is 1k, then the sample time is 1ms. If the rate is 0, then the sample time is inf. That won't cause overrun.
Catégories
En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!