フィルターのクリア

Simulink/stateflow code generation - putting model name in variable prefixes, how to stop this?

9 ビュー (過去 30 日間)
In code generation from a model, the generated code puts the model name and variable type as a prefix for the variable.
For example,
for a variable which I want to be called ""MTR_PORT_LED1", in the generated code it becomes "M69_B.MTR_PORT_LED1", where M69 is the model name and b (i assume) is the data type (boolean).
Is there a way to configure code generate such that it does not apply this prefix for the variable name?

採用された回答

Valmir Sadiku
Valmir Sadiku 2013 年 5 月 15 日
編集済み: Valmir Sadiku 2013 年 5 月 15 日
Hello,
I dont know which coder you use, but i can explain it for the Embedded Coder:
1) open the 'Model Configuration Parameter' Panel
2) go to Code Generation -> Symbols
3) than you should see the 'identifier format control' window
Now, you are able to put the prefix away, e.g. for the 'global variables'Field you just have to delete $R, after that it looks like : $N$M . I think for another coder it must be similar.

その他の回答 (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