フィルターのクリア

Inconsistent code generation of Block parameters with Embedded Coder

2 ビュー (過去 30 日間)
Ghassen
Ghassen 2024 年 5 月 27 日
I'm trying to generate C++ code via Embedded Coder.
This simple model contains some variables a,b,b1, where their constant values are implicitly set under .mat file
#
This is one of the block parameters:
When I generate code, I get the following
// Parameters (default storage)
struct P_controller_module_T {
double a; // Variable: a
// Referenced by: '<Root>/a'
double b; // Variable: b
// Referenced by: '<Root>/b'
double b1; // Variable: b1
// Referenced by: '<Root>/b1'
};
However in another model I have the following block parameters (constant values are also implicitly set under .mat files) :
But when generating code I get the following :
double Kp_lat_Value; // Expression: Kp_lat
// Referenced by: '<S11>/Kp_lat'
How do I keep the suffix "_Value" consistent ?
  1 件のコメント
prabhat kumar sharma
prabhat kumar sharma 2024 年 6 月 3 日
I suggest comparing the code generation properties. Go to the Modeling tab, select Model Properties, then Code Generation. Comparing all the attributes in both models will likely identify the attribute affecting this.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by