Exporting Simulink Blocks as standalone FMU error

9 visualizaciones (últimos 30 días)
Sharul Baggio
Sharul Baggio el 3 de Sept. de 2024
Comentada: Sharul Baggio el 4 de Sept. de 2024
Hello, I am currently trying to export the model shown below:
I am succesful in exporting matlab function blocks, the ins and outs.
However, when I export the integrate and gain block as parameters called integrator and multiplier respectively. It does not work when I run my FMU models, it ran as if the gain and intergrate block did not exist.
Is there something I missed out in the setup?
Or is it not possible to export simulink blocks as FMU?
Thanks in advance!

Respuesta aceptada

Himanshu
Himanshu el 4 de Sept. de 2024
Hey Sharul,
It is certainly possible to extport simulink blocks as FMU. You can find a related example in the following documentation link:
Please ensure the correct solver configuration, tunable parameter settings, and block compatibility. Check that the parameters (integrator and multiplier) are properly configured as tunable and that the solver can handle continuous states. Also, verify that the FMU export supports these blocks and that their initialization and data types are correctly set.
  1 comentario
Sharul Baggio
Sharul Baggio el 4 de Sept. de 2024
Hi @Himanshu thanks for the link.
I finally found my error, it was because of an input being a NaN value. And because of that, the model was not able to output the next step.
Funny because the NaN value was ignored when i ran the model on Simulink, and instead thee function carried on computing the next value.
But when I ran on my FMI it gave an error and did not continue computing. Good note for future functions!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by