Tunable parameters do not appear in generated S function

1 visualizzazione (ultimi 30 giorni)
Good afternoon,
I have a problem regarding a generated S-function from a simulink subsystem. The thing is that I want to generate an S-function from a subsystem in my simulink model. To do so, I click on the subsystem with the rigth button and I choose the option "C/C++ - Generate S function". I pick the tunable parameters I want to use and I build the function.
Everything works properly and the S function files are correctly generated. The problem is, that the chosen tunable parameters do not seem to appear anywhere. Therefore I can not tun them. Has anyone any clue about the problem? Thank you in advance.
PD: my matlab version is Matlab R2013a.

Risposte (1)

Saurabh Gupta
Saurabh Gupta il 12 Apr 2017
Although I don't know your exact use case, I am guessing that you are using some struct, enum or Simulink.Parameter type parameters. Such parameters are inlined by default because only built-in data types are supported as tunable parameters in generated S-functions. In such a case, you should see a warning in Diagnostic Viewer which would look something like
S-function parameter 'xxxx' can not be made tunable because its data type is not a built-in type
To work around it, you will need to supply individual built-in type parameters instead of combining them into composite type parameters.

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by