Why am I unable to import an FMU after exporting it from a Simulink project?
10 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2019 年 5 月 17 日
編集済み: MathWorks Support Team
2019 年 6 月 26 日
I am able to import FMU files that come from another tool. However, when I export an FMU from a Simulink Project and I try to import it back to Simulink, the model gets stuck in the initializing stage. I also tried running the following command in the MATLAB command window:
>> shareMATLABForFMUCoSim
In this case, I got the following error message:
"Error in supplied FMU: An error occurred in function 'fmi2Instantiate' for block 'Mymodel/FMU' during simulation. To view debug logs, open FMU log file. For more information, see the FMU troubleshooting documentation."
Then, I open the FMU log file which says the following:
Debug Logging enabled for block 'MyModel/FMU'
Log from FMU: [category:logStatusError, status:fmi2Error] Cannot find available MATLAB session open for co-simulation.
Log from FMU: [category:logStatusError, status:fmi2Error] fmi2Instantiate: Cannot find or connect to existing MATLAB session.
採用された回答
MathWorks Support Team
2019 年 6 月 26 日
The issue is that there is not an available MATLAB session to run the co-simulation.These are the steps to resolve the issue:
1) Open a new instance of MATLAB.
2) Execute the following command in the MATLAB command window of the new MATLAB instance:
>> shareMATLABForFMUCoSim
Note: please do not run anything else in this new instance of MATLAB.
3) After importing the FMU in the first instance of MATLAB, run the model.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!