Combining generated codes from different referenced models works?

10 ビュー (過去 30 日間)
EUNWOO
EUNWOO 2024 年 2 月 24 日
コメント済み: Suman 2024 年 10 月 1 日
Hi,
I have a simulink model (top system) where there are several different reference models.
When I build the model for the top system, codes for reference model are generated in slprj subfolder.
But When I build the model for the reference model, codes are generated in the current folder not slprj subfolder.
Comparing two source codes, you can find some difference.
What I'm wondering about is that is it possible to get the same result by combining the code separately generated for the reference model.
Let me give a specific example.
Top system has two reference model. Controller and Plant.
I generate code for Controller model and Plant model respectively.
Now I have two code sets for two models.
Controller.h, Controller.c, Controller_private.h, Controller_types.h in Controller_ert_rtw folder
Plant.h, Plant.c, Plant_private.h, Plant_types.h in Plant_ert_rtw folder
But when I generate code for top system, I have these files.
TopSystem.h, TopSystem.c, TopSystem_private.h, TopSystem_types.h,
slprj/Controller.c, slprj/Controller.h, slprj/Controller_private.h, slprj/Controller_types.h
slprj/Plant.c, slprj/Plant.h, slprj/Plant_private.h, slprj/Plant_types.h
Can I get the same result by merging codes for each reference model as I do for the top system?
Is there anyone who have done this?
Thank you.

回答 (0 件)

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by