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

25 visualizaciones (últimos 30 días)
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."

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 10 de Ag. de 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.

Más respuestas (0)

Categorías

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

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by