Effacer les filtres
Effacer les filtres

Simulink coder for model containing FMU

7 vues (au cours des 30 derniers jours)
Francesco Passigato
Francesco Passigato le 24 Août 2022
Dear matlab support,
I am using a Simulink model containing an FMU which is created with the mutlibody simulation software MBSim.
I would like to export the whole model to an external hardware. I have found the example "Compile Source Code for Functional Mock-up Units" which relies on the example "slrt_ex_vanderpol.slx" in the directory "C:\Program Files\MATLAB\R2022a\toolbox\slrealtime\examples".
If I build C++ code from the Simulink model in this example using the Simulink coder app, everything works fine. If I do the same with my model I get the error: Error during code generation: fl:filesystem:PathNotFound
I assume that the problem is in the generation of the FMU itself, i.e. outside simulink. However, I can not figure out where the problem is. In particular, it is not clear to me how to generate the files in the "sources" directory of the example, which I expect are used to create the FMU.
Do you have any suggestions how I could get rid of this problem?
Thank you very much in advance
Best regards
Francesco

Réponse acceptée

Guru Kumaresan
Guru Kumaresan le 6 Sep 2022
This issue can be due any of the following:
1) Missing binaries for Simulink Real Time:
The binaries for Simulink real time must exist in the folder 'slrt_x64' inside FMU before generating code.
Refer to the following link for more information on the same:
2) Incorrect binaries present in the FMU file
This occur can occur if the file name of the binary 'binaries/slrt_x64/all.so' is incorrect in the FMU file.
The issue can be resolved by changing the binary name from the 'all.so' to 'model_name.so' in the FMU file.

Plus de réponses (0)

Catégories

En savoir plus sur Create Standalone FMU dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by