Tunable parameters do not appear in generated S function

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.

回答 (1 件)

Saurabh Gupta
Saurabh Gupta 2017 年 4 月 12 日

0 投票

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.

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

製品

質問済み:

2017 年 4 月 7 日

回答済み:

2017 年 4 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by