Updated Simulink model in Matlab 2022 won't compile

8 views (last 30 days)
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 Comments
Angelo Yeo
Angelo Yeo on 23 Jul 2023
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 on 23 Jul 2023
There is not any error. It just hangs and then Matlab crashes and disappear.

Sign in to comment.

Answers (1)

Ayush
Ayush on 3 Aug 2023
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.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Tags

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!