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
42 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
一步
am 9 Nov. 2024
Hi:
I am also facing similar error. Have you solved your problem?can you teach me this question?Thank you!
Antworten (1)
Githin George
am 4 Dez. 2024
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 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!