What is the meaning of the task overrun detected output?
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 3 de Nov. de 2017
Do you have any continuous blocks? Those would have timestep 0
Tyler
el 3 de Nov. de 2017
Walter Roberson
el 3 de Nov. de 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 ?
Respuesta aceptada
Más respuestas (1)
Fangjun Jiang
el 3 de Nov. de 2017
1 voto
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 comentarios
Tyler
el 3 de Nov. de 2017
Fangjun Jiang
el 3 de Nov. de 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.
Categorías
Más información sobre Simulink Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!