- For modifying parameters, please read about Run-Time Parameters. This will help you see how to modify your model so that parameters can be tuned in the generated code.
- For inputs and outputs, they should appear at the top level of your model or Model Reference so that they are inputs/output to the generated code.
For Simscape Multibody, Is it possible to generate C code which can be customized?
2 ビュー (過去 30 日間)
古いコメントを表示
I have succeded to generate C Code using Embedded Coder for some Simulink model, not for simscape block
With the C Code, I was able to customize input/output parameter of XXXXX_step function.
But with simscape block, is it possible to generate C code which can be customized?
When I tried to do it with Embedded corder (target mode is ert.tlc), I faced some problem that generated code and some reference gave me some error message. (ex. "creal_t" is undefined type)
So I'm trying to generate C code using Simulink Coder.
However, it seems that Simulink corder only create C code which can not be customized. ( It seems to be similar to an realeased application )
What I want is generated C Code which works like some code made with Embedded Coder.
Is it possible?
0 件のコメント
採用された回答
Steve Miller
2022 年 12 月 1 日
Hi JL,
While you can certainly read and edit the code that is produced from Simulink Coder or Embedded Coder, we generally do not recommend manual changes to the code. If the model changes and you regenerate the code, your manual changes will be lost (or you will have to do them again).
From your post, it sounds like you want to "customize input/output parameters". I believe you should make the changes to the model such that these inputs, outputs, or parameters are easily accessible in workflows that use the generated code with no (or minimal) modifications.
If you can tell us specifically what you want to do, we can guide you to more targeted resources. Ideally, you would not need to modify the generated code.
--Steve
その他の回答 (0 件)
参考
カテゴリ
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!