フィルターのクリア

How to build Referenced Model as normal subsystem when build?

3 ビュー (過去 30 日間)
XX
XX 2023 年 2 月 10 日
回答済み: Divyank 2023 年 2 月 10 日
When I build the top model, it cost a lot time to build referenced models, and will crashed if referenced model contains many signals to resolve.
If I copy the referenced model's content to replace the referenced model in top model, it will build very fast.
So, how to convert a Referenced Model to Subsystem, OR just treat it as a Subsystem when build?

回答 (1 件)

Divyank
Divyank 2023 年 2 月 10 日
Hello @XX, to convert a referenced model to a subsystem in Simulink, you can perform the following steps:
  1. Open the referenced model that you want to convert.
  2. In the Model Explorer, right-click on the referenced model and select "Create Subsystem". This will create a new subsystem block that encapsulates the entire content of the referenced model.
  3. Save the new subsystem.
  4. In the top model, delete the old referenced model block and replace it with the new subsystem block that you just created.
  5. Save the top model.
Alternatively, if you want to treat a referenced model as a subsystem during simulation, you can set the 'Treat as Atomic Unit' option in the Configuration Parameters of the referenced model to 'on'. This option causes the referenced model to be treated as a single, atomic unit during simulation, and can improve simulation speed. Note that if you set this option, you won't be able to step into the referenced model during simulation and debug its internal behavior.

カテゴリ

Help Center および File ExchangeComponent-Based Modeling についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by