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

24 views (last 30 days)
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."

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Aug 2021
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.

More Answers (0)

Categories

Find more on Application Deployment in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!