Simulink model instances with data dictionary

3 ビュー (過去 30 日間)
Ander Albizu
Ander Albizu 2019 年 3 月 11 日
回答済み: Harish Vavilla 2019 年 3 月 22 日
Good morning, I am developing a project where I have a referenced model. I want to get 2 instances of these models using different values of configuration. For that i have read the documentation of Matlab/Simulink about these option:
In the documentantion there isn´t anything about data dictionaries. My idea is to use Data Dictionaries in my model but having this opportunity.
Is this possible? Has someone do something similar?
if it is not possible I think the best solution is to use modle workspace to get the model in a capsule. What do you think?
Thank you!

回答 (1 件)

Harish Vavilla
Harish Vavilla 2019 年 3 月 22 日
Hello Ander,
i understand you want to use multiple instances of the same model but should be able to provide different possible parameters for those instances.
If you have R2019a,
There is a new feature called Instance parameters to do this and the doc link can be found here
If you have an earlier version,
In that case As you have rightly described give a Variable name to the Parameter(lets call it with name P on the block name) in the model but Don't define it in the Model WorkSpace of the that model(lets call it model1).
Now create mode2 with model references to model1 with variable P defined in its Model WorkSpace having the value you want.
Similar to the last step create model3 with model references to model1 with variable P defined in its Model WorkSpace having the value you want.
Now create model 4 that has model reference to model2 and model3. This is your final solution.

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by