fmu can import into Simulink, and it can run normally with my model,but can not compiled with my model;the error is .../FMU does not support code generation.

16 次查看(过去 30 天)

回答(1 个)

Prathamesh
Prathamesh 2023-9-21
Hi,
I understand that you are receiving the error message stating that “the FMU does not support code generation”.
This error occurs when you are trying to generate code for an FMU block that is not supported for code generation.
To resolve this issue, you can follow the pointers mentioned below:
  1. Declare the FMU function as extrinsic in your MATLAB code, to call the unsupported FMU function in a MEX. The function bypasses code generation and instead uses the MATLAB engine to execute the call.
  2. Manually implement the FMU function as custom MATLAB code that is supported for code generation or C/C++ code.
For more information refer to the documentation attached below which explains the steps to resolve this error in detail.

类别

Help CenterFile Exchange 中查找有关 Create Standalone FMU 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by