- Build and save Simscape models in the earliest release you are trying to export them to. In doing so, you eliminate the need to make the model backwards compatible, as forward compatibility is already supported.
- Remove any functionality that was not yet introduced in the version you are trying to export to. MATLAB Release notes can be used to track the changes. For this example, replacing the 'inherit' units option in the PS-Simulink Converter blocks would resolve the issue.
Why do I receive an error when saving a Simscape model as a previous version and trying to compile it in that version?
조회 수: 15 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2021년 2월 12일
편집: MathWorks Support Team
2022년 11월 23일
When I save my Simscape model in a previous version and try to compile it, I receive an error. How do I configure my models so that they are truly compatible?
The exact error I am receiving is:
Error due to multiple causes.
Caused by:
Error using slcontrollib.mdlcfg.ParameterManager/compile
Error in 'simscapeValidation33bar_old/PS-Simulink Converter': Initialization commands cannot be evaluated. - Show complete stack trace
Error using slcontrollib.mdlcfg.ParameterManager/compile
Unit name, 'inherit', is not recognized - Show complete stack trace
Error using slcontrollib.mdlcfg.ParameterManager/compile
Error in 'simscapeValidation33bar_old/PS-Simulink Converter1': Initialization commands cannot be evaluated. - Show complete stack trace
Error using slcontrollib.mdlcfg.ParameterManager/compile
Unit name, 'inherit', is not recognized - Show complete stack trace
채택된 답변
MathWorks Support Team
2022년 10월 14일
편집: MathWorks Support Team
2022년 11월 23일
Exporting a model to a format used by an earlier version (Simulation > Save > Previous Version) is not supported for models containing Simscape blocks. Refer to the documentation describing Simscape limitations.
This specific error is caused by the update in R2019b where the PS-Simulink Converter blocks added the option 'inherit' to the unit selection. This can be found in the release notes.https://www.mathworks.com/help/simscape/release-notes.html?rntext=&startrelease=R2019b&endrelease=R2019b&groupby=release&sortby=descending&searchHighlight=
Two recommended workarounds are:
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Variable Initialization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!