How do I avoid errors saying my Simulink Real-Time model is out-of-date and must be rebuilt?

7 views (last 30 days)
I like to reuse my built models by loading the last build onto the Simulink Real-Time (SLRT) target instead of rebuilding the model before loading it onto the target. 
When I do this, I sporadically get the error message:
Error using slrealtime.Target/throwError
Cannot load 'model' on target 'TargetPC1': Cannot install 'model'
on target 'TargetPC1': 'model' is out-of-date and must be rebuilt.
Error is slreatime.Target/load
The message won't go away until the model is rebuilt, which defeats the purpose of reusing the built model .MLDATX file.
I share my model with colleagues across 3 computers using version control. The issue appears to occur more frequently after someone has pushed a model.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Oct 2021
Edited: MathWorks Support Team on 27 Oct 2021
There may be several possible reasons for this error message:
(1) If you use version control, one reason for the error could be that the tool has corrupted the target application (.MLDATX file).
To resolve this, make sure that you have registered the .MLDATX file extension as binary format with your third-party source control tool. If you do not register the extension, these tools can corrupt the files when you submit them by changing end-of-line characters, expanding tokens, substituting keywords, or attempting to auto-merge. See the following documentation page for more information:https://www.mathworks.com/help/matlab/matlab_prog/set-up-git-source-control.html#buhx2d6-1_3
(2) Another reason for this error could be if the target application (.MLDATX file) was built on a different update of the release compared to the machine that's connected to the target. It is likely that not all users contributing to the project are on the same update of the release.
You should verify that all the computers being used are on the same release update.
(3) Please verify if the "Speedgoat I/O Blockset" used on the machine to build and run the model has the exact same version installed.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!