How do I stop Simulink pausing every quarter second?

1 visualización (últimos 30 días)
Sean Kavanagh
Sean Kavanagh el 23 de Feb. de 2022
Respondida: Sean Kavanagh el 28 de Nov. de 2023
I have a Simulink model that receives a UDP packet, does some calculations and transmits a reply packet. This works extremely well, for the most part, but approximately every 0.25 seconds the model stops running for about 10ms before resuming. This introduces a 4Hz artifact at the input to the program receiving and displaying the packets from Simulink.
The model runs with a 1ms fixed time step, and processes UDP packets in the same time step as they come in (at ~1kHz in real-time). Reducing the model rate to a 2ms time step and sending out UDP packets at that rate has no effect on the frequcny of the pauses in real time. Running in Accelerator mode also had no effect on the pauses. However, stripping out some of the Simulink model doing the processing reduces most of the real time delay, but doesn't remove it completely.
Is there a known cause for a Simulink model to pause calculation like this, or is it an unavoidable feature of running on a non real-time operating system?

Respuesta aceptada

Sean Kavanagh
Sean Kavanagh el 28 de Nov. de 2023
In case anyone else has the same problem:
This turned out to be a result of Display blocks in the model. They seem to update at this rate, and that takes time.
Commenting out (or removing) all the Display blocks in the model resolved the situation.

Más respuestas (0)

Categorías

Más información sobre Multicore Processor Targets en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by