Error Updating Model Reference SIM Targets (an error occured during the call to make)

Hello allm
I have two big separated models on simulinks, each of them can be simulated without any problems on matlab 2018B. Now I tried to integrate them into one massive models. Each of those models consists of many subsystems and codes. After I integrate them, I tried to make an adjustment to the models so they can be performed flawlessly.
when I simulate it, an "updating model reference SIM target (1 of 5)" was performed and it took 1.5 hour only for the first one and it ended with an error stated " an error occurred during the call to make, is not recognized as an internal or external command" , as shown on the attachment.
I tried actually to uncomment that subsystem to check if the other subsystems can still be performed, and it ended up perfect, which mean the simulation can be run. The problematic subsystem actually consists of signals which connected only into 3D lookup tables.
does anyone has idea or solution to encounter this problem?
Thank you
Regards
Daniel

 Accepted Answer

The error is coming from the mingw compiler that Simulink is using to compile/link the code generated from model "machine". Do you have access to Visual Studio? If so, use the mex -setup command to switch compilers to see if the code will compile/link with Vis Studio.

3 Comments

hi @Mark McBroom I don't have access to Visual Studio, however do you mean by switching compilers is as shown as in the attachment?
Anyway I finally successfully solved the problem, by removing those "model" blocks, that I created to integrate between these two models. I don't understand the reason why the "model" blocks is the main reason for these failure. Now the integrated model can be flawlessly simulated in simulink.
However, now I'm tried adjust the integrated model into GUI, which means I could simulate it with easier User Interface. However, another problem occured, which the process took more than 1 hour and ended up unsuccessfully simulated.
The status for compiling inside the simulink worked fine (which I'm quite sure, that the code to add the integrated model are sucessfuly writen). The status after compiling as shown as in the attachment (2.png), wasn't changed for more than 1 hour, before it showed an error.
What does actually "building the rapid accelerator target" do? and how should I encounter the problem (as shown as in 3.png)?
Regards
Daniel
Rapid accelerator mode speeds up a simulation by generating C code from the entire simulink model and runnning the compiled code. The error you were getting is occuring when Simulink is trying to compiile and lnk the code for rapid accelerator mode. You could change rapid accelerator mode back to normal mode and your model should simulate properly.
@Mark McBroom yes, finally it works! either with normal or accelerator mode. Thank you :) !

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!