Simulink code generation utility function

7 ビュー (過去 30 日間)
Raymond Gilbert
Raymond Gilbert 2019 年 3 月 4 日
回答済み: Mark McBroom 2019 年 3 月 6 日
So, I am generating some C code for a model I have created using some code that I have modified.
The original 'autocoding' scripts produced a .h and .c file called look2_binlxpw
The scipt I have created shoves that look2 inside of the main .h and .c file.
That would normally be okay but the end goal is to provide this code to a customer and when I do so, I would rather have one utility that I can pass forward, since multiple files will end up coding with this look2_bin.
The old code that separated this away from the main function did so using
set_param(subsystem, 'RTWOptions', opts);
Where opts was a huge array of data, but it was set up in there. I am trying to avoid RTWOptions as it is obsolete
rtwtypes, rtgetNaN, rtnonfinite are all created and placed in the project folder. Not sure why this one wont or what the proper parameter for it is.

採用された回答

Mark McBroom
Mark McBroom 2019 年 3 月 6 日
If you change the configuration parameter UtilityFunctionGeneration to "Shared location",
set_param(bdroot,'UtilityFuncGeneration', 'Shared location')
then code for blocks such as lookup table blocks will be placed in:
/slprj/ert/_sharedutils

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by