Why do I get the error "Unable to resolve the name Simulink.Parameter" when executing my compiled Simulink model?

24 ビュー (過去 30 日間)
I have a has a Simulink model which I would like to compile into a standalone application. My model runs fine directly from Simulink and I am able to successfully compile the model into a standalone application. When I try to run the generated standalone application, I get the following error:
"Unable to resolve the name Simulink.Parameter."

採用された回答

MathWorks Support Team
MathWorks Support Team 2021 年 8 月 10 日
This error occurs because 'Simulink.Parameter' methods are not supported with Simulink Compiler. This means that you cannot create or modify Simulink.Parameters in the deployed script or application.
However this does not mean that a model that uses Simulink.Parameters cannot be compiled, Simulink.Parameter METHODS are not supported but Simulink.Parameter OBJECTS are supported. As long as the Simulink.Parameters were created before the model was deployed and you modify the parameter values only using the setVariable() method of the Simulink.SimulationInput object, the model should be supported with Simulink Compiler.
Some solutions are to either:
  • Only create and edit Simulink.Parameter objects before the model is deployed and not inside the deployed script
  • replace the locations where 'Simulink.Parameter' objects are used in the model with simple MATLAB variables.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeApplication Deployment についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by