S-function parameters must be one or two dimensional nonsparse numeric or character arrays unless the S-function uses a TLC file and has an mdlRTW function
15 ビュー (過去 30 日間)
古いコメントを表示
I am trying to build a Simulink function with system terget fule naming "grt.tlc". While performing the same I am getting the follwing error:
Invalid parameters for S-function 'BD_INSIGHT_HIL_19a/SM_Advisor/<vc> insight/pre-TX parallel gearbox control/downshift command/load fraction/S-Function'. For code generation, S-function parameters must be one or two dimensional nonsparse numeric or character arrays unless the S-function uses a TLC file and has an mdlRTW function.
Please help me to relove the issue.
2 件のコメント
一步
2024 年 11 月 9 日
Hi:
I am also facing similar error. Have you solved your problem?can you teach me this question?Thank you!
回答 (1 件)
Githin George
2024 年 12 月 4 日
As the error message is suggesting, your S-function may be dealing with types other than one or two dimensional nonsparse numeric or character arrays. To support such S-functions for code generation you would need use a custom TLC and specify the “modelRTW” function.
The “mdlRTW” function is generally responsible for providing customization to the generated file “model.rtw” and is invoked before code generation.
You can refer to the following section of the documentation to learn more about writing TLC files for your S-function.
Additionally, the following example might help in providing example code for "mdlRTW" function.
In MATLAB Command Window, type:
>> sfundemos
Click on ‘C-file S Functions’ -> ‘Miscellaneous’ -> ‘Multiple Ports’ to open the demo “ sfcndemo_sfun_multiport”. Inspect the M file mentioned in the example.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Code Generation for Custom Blocks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!