1 library block is generated in autocode as 2 different functions. How can I generate 1 common function?
1 回表示 (過去 30 日間)
古いコメントを表示
I have created a custom library 'abc' in Simulink and set it as atomic. This atomic library is used at 2 places in the model and where its used as follow: 1. it gets input signal which is generated locally in the same subsystem. 2. it gets input signal which is generated in another atomic subsystem.
So when I generate code using Embedded Coder, two different functions are generated. 1. abc() -> this uses the local signal 2. abc_x() -> this uses the signal from another atomic subsystem
My problem is 2 different functions are used which increase in memory consumption. So how can I generate 1 common function for both the purpose ?
0 件のコメント
回答 (1 件)
TAB
2018 年 8 月 30 日
In Subsystem block parameter dialog, goto "Code Generation" tab and select "Function Packaging" as "Reusable function".
参考
カテゴリ
Help Center および File Exchange で Deployment, Integration, and Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!