Borrar filtros
Borrar filtros

Simulink coder for model containing FMU

6 visualizaciones (últimos 30 días)
Francesco Passigato
Francesco Passigato el 24 de Ag. de 2022
Respondida: Guru Kumaresan el 6 de Sept. de 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

Respuesta aceptada

Guru Kumaresan
Guru Kumaresan el 6 de Sept. de 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.

Más respuestas (0)

Categorías

Más información sobre Create Standalone FMU en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by