FMU Export - Model Exchange & Co-Simulation

Dear Sir or Madam,
I have recently seen that FMU exportation under Model Exchange option has been included in MATLAB R2024b release.
I am trying to export a Simulink model as FMU - Model Exchange using the command:
exportToFMU(SimulinkModelName, 'FMIVersion', '2.0', 'FMUType', 'ME')
However, I get the following error:
The make command returned an error of 2
Build Summary
Top model targets:
Model Build Reason Status
====================================================================================================================
SimulinkModelName Information cache folder or artifacts were missing. Failed to build. For more information, see build log.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 27.437s
Error using exportFMU_ME (line 36)
Error(s) encountered while building "SimulinkModelName"
I had successfully exported this same model as FMU - CoSimulation.
exportToFMU2CS(SimulinkModelName)
Why is it possible to export the model under the CoSimulation option and not under the Model Exchange option?
Thank you very much in advance.
Best regards,
Víctor Sánchez Suárez
Norvento Enerxía S.L.

3 Comments

Could you please confirm if this issue occurs with all Simulink model files, or is it specific to a particular model? Additionally, could you provide details about the types of blocks used in your Simulink model?
I have the same issue with all the Simulink model files I have tried with.
In these models, I use the typical blocks that are used in control applications for power converters based on power electronics, i.e. battery chargers, wind turbines... For instance, I use delays, arithmetic operations, integratos, low-pass filters, look-up tables, abc-dq transformations, conditional statements...
Thank you very much in advance.
Best regards,
Víctor Sánchez Suárez
Norvento Enerxía S.L.
I successfully exported the "Anti-Windup Control Using PID Controller Block" example simulink model to 'Model Exchange' FMU using the exportToFMU function. Could you please share your Simulink model file for further assistance? You can open the example model with the following command:
openExample('simulink_industrial/AntiWindupControlUsingAPIDControllerExample')

Sign in to comment.

Answers (0)

Categories

Products

Release

R2024b

Asked:

on 30 Sep 2024

Commented:

on 3 Oct 2024

Community Treasure Hunt

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

Start Hunting!