Tunable parameters do not appear in generated S function
4 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Saurabh Gupta
on 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.
0 Comments
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!