フィルターのクリア

Automatically rename external Output in generated C-Code

2 ビュー (過去 30 日間)
Steffen Schmees
Steffen Schmees 2018 年 9 月 11 日
回答済み: Vineeth Nair 2018 年 9 月 14 日
Hello community, I am using the embedded coder in Matlab 2017b to generate code from my Simulink models. My problem is that I have multiple Simulink models and I want to generate code for each of them seperatly. Unfortunately the embedded coder labels the external structure for each model the same. Therefore, when I include the header and source files from the generated code I get redefinitions. Is there any way to automatically rename these external structures?
extern ExtU rtU
extern ExtY rtY
Thank You

回答 (1 件)

Vineeth Nair
Vineeth Nair 2018 年 9 月 14 日
I am not exactly sure, what you mean by external structure. If you are asking about the external output ports, which are defined in a structure in the header file, then you can rename these output ports in the Simulink model. By default they are named as Out1, Out2, etc. Also to rename other variables generated by code generator, In model configuration parameters, Under code generation, there is option called Symbols. You can rename various variables and methods here.

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by