Unable to convert the 2021 mdl to 2009b mdl

2 ビュー (過去 30 日間)
jenny
jenny 2023 年 6 月 29 日
編集済み: Fangjun Jiang 2023 年 9 月 22 日
Hello,
I'm unable to open the 2021b model in 2009b. When trying to open the model in 2009b . It is giving me the below error
"MDF file is probably corrupted, UserData parameter is invalid"
I have tried below methods
  1. Tried to export the model to previous version but there is no 2009b option in dropdown list
  2. Unchecked "Do not load the models created in newer versions of simulink"
None of the above worked.
Can someone suggest what to do?
Thank you in advance
  2 件のコメント
DGM
DGM 2023 年 6 月 29 日
Are you even sure that the dependencies of your model even exist in R2009b?
Walter Roberson
Walter Roberson 2023 年 6 月 30 日
if it is a MDL file then it is text. Take a copy and edit the copy so that the UserData properties are empty and see what happens with that.
Side note: R2021b is roughly the release in which Simscape Electronics libraries were rewriten, so if it uses Electronics (including Specialized Power Systems) then you might not be able to export to a previous version.

サインインしてコメントする。

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2023 年 9 月 22 日
編集済み: Fangjun Jiang 2023 年 9 月 22 日
You can do this, but of course, if there are blocks that are available in R2021b but not in R2009b, then there could be issues. You will see those warning messages in the MATLAB Command Window.
Simulink.exportToVersion('CurrentModel','ModelInR2009b','R2009B')
Note:
If you use the Export to Previous Version dialog box instead of Simulink.exportToVersion, then the Save as type list supports 7 years of previous releases.

カテゴリ

Help Center および File ExchangeSimulink Environment Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by