fmi2ExitIn​itializati​onMode error

26 ビュー (過去 30 日間)
Rajaram
Rajaram 2025 年 3 月 31 日
編集済み: Larry 2025 年 5 月 6 日
Hi all,
I am getting an 'fmi2ExitInitializationMode' error when simulating an imported FMU (which was generated in GT-ISE2024) in MATLAB 2024b .
Can anyone pls look into this and suggest some way to overcome this error!
  1 件のコメント
Adarsh
Adarsh 2025 年 4 月 2 日
Once can you make sure there are no spaces in the path to the FMU and try simulating the FMU again. Some of the errors can be arised due to representation of " "(space) as "%20" by MATLAB.

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

回答 (2 件)

Maneet Kaur Bagga
Maneet Kaur Bagga 2025 年 4 月 2 日
Hi,
As per my understanding from the log attached, the error occurs at "fmi2ExitInitializationMode", which suggests the issue with the transition from initialization to simulation. Please refer to the following as the possible workaround for the same :
The log shows "F_OilPumpSpeed = 0.0e+000" which can be a possible error as FMU expects a non zero value. Please refer to the following MathWorks documentation for the same.
Also, the log shows the following error:
fmi2SetupExperiment: toleranceDefined=0 tolerance=0.001
For resolving the above in MATLAB, set a nonzero tolerance before running the FMU:
fmi2SetupExperiment(fmu, 'tolerance', 1e-4);
You can enable the Debug mode in MATLAB for better understanding the error. Also, try isolating the error occuring because of MATLAB to check if there is an error in FMU itself or the error is caused after running in MATLAB.
Hope this helps!
  1 件のコメント
Rajaram
Rajaram 2025 年 4 月 2 日
Hi Maneet,
Thanks a lot for your time and suggestions, will try these options

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


Rajaram
Rajaram 2025 年 4 月 2 日
Hi all,
The error resolved when I generated a standalone FMU instead of GT-needed FMU and now it is running in simulink without any error.
  1 件のコメント
Larry
Larry 2025 年 4 月 3 日
編集済み: Larry 2025 年 5 月 6 日
The fmi2ExitInitializationMode error usually means the FMU failed during initialization. Check parameter settings, required inputs, and compatibility with MATLAB 2024b. Enable FMU logging for detailed errors, or test in other tools like FMPy or FMUChecker. Group projects took up most of my time this semester, and solo assignments kept piling up.

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

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by