How can keep tunable parameters of reference models in Simulink Coder generated code ?

2 views (last 30 days)
I have a Simulink model that references several models ("Model" blocks) and I want to produce code for a real time platform. I don't know how to to keep the tunable parameters in the generated code.
I defined the tunable parameters as Simulink.parameter objects in the model workspace of all referenced models. The storage class is "Auto" since reference model's variables cannot have storage other than auto (quoted from both error message and simulink help). These parameters are not used as model arguments. I tried to define the same simulink.parameter variables in MATLAB's base workspace and change the storage class to ExportedGlobal when I generated the code, but I did not find the global variables in the code.
How can I generate global tunable parameters for the reference models as ExpotedGlobal variables in generated code?
Regards,

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!