Borrar filtros
Borrar filtros

Simulink model instances with data dictionary

1 visualización (últimos 30 días)
Ander Albizu
Ander Albizu el 11 de Mzo. de 2019
Respondida: Harish Vavilla el 22 de Mzo. de 2019
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!

Respuestas (1)

Harish Vavilla
Harish Vavilla el 22 de Mzo. de 2019
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.

Categorías

Más información sobre Event Functions en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by