Tunable parameters do not appear in generated S function
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Saurabh Gupta
2017년 4월 12일
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
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!