How do I stop Simulink pausing every quarter second?

1 view (last 30 days)
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?

Answers (0)




Community Treasure Hunt

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

Start Hunting!