Data dictionary and model reference

12 ビュー (過去 30 日間)
qfladen
qfladen 2018 年 5 月 29 日
コメント済み: qfladen 2018 年 5 月 30 日
Hi everybody,
I've got a model testbench which is linked to a data dictionary. In that model I used another model as model reference which is not linked to a data dictionary. All parameters of the model reference can be passed down to the model by using a mask or are defined in the model workspace so that it can exist independent of any data dictionary. When compiling, simulink tells me
Error in Model block [childModel]. Referenced model [childModel] is configured to use the base workspace. It must be linked to dictionary [...] (used by [parentModel]) or a dictionary referenced by [...]. Click here to link [childModel] to a dictionary.
Why is this necessary? I want my child model to be independent of the data dictionary so that I could use that model in other projects, which don't use that dictionary, as well.

採用された回答

TAB
TAB 2018 年 5 月 30 日
編集済み: TAB 2018 年 5 月 30 日
According to Simulink documentation, if a Parent model uses the data dictionary, its child models (used by model reference) should also be using same data dictionary for shared data.
The data which are not shared between the models in hierarchy, can be stored in model workspace.
This is how Mathworks has designed the simulink to use data dictionary. Data dictionary feature is relatively new in Simulink and there are many scope of improvement and changes.
  1 件のコメント
qfladen
qfladen 2018 年 5 月 30 日
Ok I see, obviously this is not the way mathworks wants the user to use data dictionaries. I hope that will change in future releases. For now, I guess I will just use a subsystem instead of a model in order to achieve what I wanted, thanks for the answer!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by