Updated Simulink model in Matlab 2022 won't compile

5 次查看(过去 30 天)
Hello,
So what I am trying to do is to update a 2016b Simulink model to 2022b. Each time I pressed on run it complained about something. I fixed all those issue untill no error was left. Then I tried to run the model. Everything hangs and Matlab freeze in "Compiling: Caching actual sources and destinations: Started". Untill Matlab closes totally. I do not have this problem in Matlab 2016b nor in Matlab 2018b. What is the problem?
  2 个评论
Angelo Yeo
Angelo Yeo 2023-7-23
It's better if you can upload your model so that people can reproduce your issue. Please upload your model and reproduction steps.
If you do not want to upload the model, at least you should share the whole error message.
Peppe
Peppe 2023-7-23
There is not any error. It just hangs and then Matlab crashes and disappear.

请先登录,再进行评论。

回答(1 个)

Ayush
Ayush 2023-8-3
Hi Peppe
As per my understanding you are trying to run the Simulink model in R2022b and your MATLAB crashes when you try to run the model.
It indicates that there might be an issue with the model or the MATLAB installation. Here are some of the troubleshooting steps you can try:
  • Disable unnecessary optimizations: In some cases, certain optimizations enabled in the Simulink configuration settings can cause freezing or hanging during model compilation. Try disabling specific optimizations one by one (e.g., block reduction, expression folding, etc.) to identify if any specific optimization is causing the issue.
  • Increase MATLAB memory allocation: MATLAB may require additional memory to compile and simulate complex models. You can try increasing MATLAB's memory allocation by going to "Preferences" -> "MATLAB" -> "General" -> "Java Heap Memory" and increasing the value.
Note that increasing the memory allocation may have an impact on the overall performance of MATLAB and other applications running on your machine. Make sure to allocate a reasonable amount of memory based on the available resources and the requirements of your specific use case.
  • Test on a different machine: If possible, try running the model on a different machine with MATLAB 2022b installed. This can help determine if the issue is specific to your machine or if it's a more general problem.

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by