フィルターのクリア

How can I customize the function prototype of the "step" routine (modelname_step()) in the generated code in MATLAB R2012b?

20 ビュー (過去 30 日間)
When I generated code from my Simulink model the entry point functions in the generated code appear as "modelname_step()" function, with no arguments.
However, I want to change the name of this entry point function to "modelname_run()". I also want the function prototype to include all of the bus structures that I've defined into and out of the model.
How can I accomplish this?

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 5 月 24 日
編集済み: MathWorks Support Team 2024 年 5 月 24 日
"model_step()" and is the default name of the step routine in the code generated from a Simulink model. If you use Embedded Coder, you can customize this code interface appearance in the generated code. This means the System Target File should be set to ert.tlc.
Follow the steps below to customize the generated code for this use case:
1. Go to Configuration Parameters -> Code Generation-> Interface.
2. In this pane, go to the section titled “Code Interface” and click on “Configure Model Functions” button to open the “Model Interface” window.
3. Change the Function Specification field to “Model specific C Prototypes”.
4. Hit 'Get Default Configuration'
5. Now configure the names of the “step” function and the arguments of the “step” function to include all relevant input/output structures.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModel References についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2012b

Community Treasure Hunt

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

Start Hunting!

Translated by