- Check if any background processes or applications are consuming an excessive amount of CPU or memory resources. High system load can affect the simulation performance and cause delays.
- Please ensure that there are no recent changes made to the S-function or Simulink model. It is probable that a small modification led to a steep increase in system utilization, causing this issue.
Simulink running slow (15 seconds real time = 1 second running time ) on monitor and tune
6 ビュー (過去 30 日間)
古いコメントを表示
I am running a ball and plate system on Simulink using arduino mega 2560. I'm using a mac with i5 intel core and 8 GB ram. About a week ago I had it working very well and the running time matched real world time. However for the past couple days the simulation time starting running in milliseconds. This created a delay in the reading of the plate and so no matter how much tuning i do the delay is makes the system hard if not impossible to tune. I had this problem before and I dont know what causes or fixes it. I am using an S function to read data and can only use fixed step solver which i have on auto.
0 件のコメント
回答 (2 件)
Shivani
2023 年 9 月 18 日
It will be difficult to determine the exact cause of this issue without the code and the model. However, please try out these potential resolutions mentioned below:
Please refer to the following documentation for more information on handling real-time simulation issues.
You can also refer to this MATLAB Answer addressing a similar issue
I hope this answers your question!
0 件のコメント
Noman Nosher
2024 年 1 月 23 日
Try to change the sample time of all of your hardware blocks to -1.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Arduino Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!