How to export a matlab/simulink model to FMU

22 ビュー (過去 30 日間)
Jon
Jon 2024 年 1 月 8 日
移動済み: madhan ravi 2024 年 1 月 26 日
Hello everyone,
I have downloaded this "bouncing ball" simulink model from this page https://es.mathworks.com/help/simulink/slref/simulation-of-a-bouncing-ball.html (image below).
Now, I want to export it to FMU.
2 doubts:
-Is there any way of doing it via the simulink itself, clicking on tabs/options? I cannot find the option of exporting to FMU in the tabs of simulink.
-In the other hand, is there also any way of doing it via code with Python? I know that it can be done via Python with OpenModelica models. Is also possible to do it with simulink models?
Thanks a lot in advance,
  6 件のコメント
madhan ravi
madhan ravi 2024 年 1 月 12 日
移動済み: madhan ravi 2024 年 1 月 26 日

In the first link I shared it clearly states the requirements:

Jon
Jon 2024 年 1 月 22 日
移動済み: madhan ravi 2024 年 1 月 26 日
Thank you a lot,
I export to FMU in both ways: via the options of the bar save>export to standalone FMU and via code
In both cases, it gives me a scope to check the simulaion and the following error (images below):
What does that error mean and what is it preventing me from doing exactly?
Also, where is the .fmu file? I cannot find it
Thank you a lot in advance,

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

採用された回答

Jon
Jon 2024 年 1 月 26 日
編集済み: Jon 2024 年 1 月 26 日
SOLVED
I think that this issue of "Error using ScriptParaFMU
Toolchain 'LCC-win64 v2.4.1 | gmake ...... etc"
Is the reason why the .fmu file is not formed.
This exact same issue is asked here, and I solved it installing MATLAB Support for MinGW-w64 C/C++/Fortran Compiler from here and also installing (just in case) Microsoft Visual c++ on my computer. After that, no error occurs and the .fmu file is formed perfectly.
I have a Windows 10 x64 by the way

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreate Standalone FMU についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by