Simulink Real-Time runs very slow

18 views (last 30 days)
Martin Novak
Martin Novak on 15 Nov 2021
Answered: Dimitri MANKOV on 15 Nov 2021
I am running Simulink Realtime (Matlab R2019a) on Windows 7.
The model is very simple - attached here. Sometimes the model runs fine, in realtime as it should. However sometimes the model runs very slow, for example 1 second of model time takes 10 minutes. Sometimes means that for example I restart the computer or Matlab and it starts/stops working. I have tryied on several computers, the behavioar is the same. On some occasions it works, on some not.
Nothing changes in the computer, the CPU runs at about 20 percent. What helps sometimes is to reinstall the sldrtkernel. But sometimes it does not help. I am aware of the answer here in the forum that hypertreading should be disabled. This does not solve the problem.
I am attaching the video when it works and when it doesn´t.
Any ideas what is wrong?

Answers (1)

Dimitri MANKOV
Dimitri MANKOV on 15 Nov 2021
Hi Martin,
I believe the problem comes from a misconfiguration of your model. According to your videos, you're once running it using the "Accelerator" mode, and once using the "Normal" mode. If you wish to deploy your Simulink model on a target machine in Simulink Real-Time (while using the model itself as a user interface to the real-time application running on the target), you should select the "External" mode.
Please also note that the blocks from your model are from the Simulink Desktop Real-Time, which is not the same product as Simulink Real-Time.
Best,
Dimitri

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by