Implementing Model Reference, Data Dictionaries, and Buses

3 vues (au cours des 30 derniers jours)
Dave Walter
Dave Walter le 21 Août 2015
Commenté : Dave Walter le 21 Août 2015
Hello,
I have a large model with multiple collaborators. We have a system bus defined as well as several submodels using model reference. In order to simplify the workspace, I wanted to use Data Dictionaries for the model referenced subsystems. This seems to interfere with the system bus, though. It looks like I'll need to Bus system defined in the data dictionary for each referenced model. This would work, but would be incredibly cumbersome if the system bus was modified - we'd have to ensure the same modification occurred with every data dictionary.
Is there a way to have the referenced model subsystem use the data dictionary for its workspace but access the base workspace for the system bus? Right now, if the bus is not defined in the data dictionary the model cannot resolve the bus even though it is defined in the base workspace.
The main place I am facing this issue is initializing the system bus using a constant (a struct defined in the data dictionary) The constant block needs to be explicitly set as the bus datatype

Réponse acceptée

Sebastian Castro
Sebastian Castro le 21 Août 2015
I would recommend placing all the bus objects in a separate data dictionary (say, BusData.sldd), and then referencing that dictionary in all other ones as needed.
This makes sure that all your bus data is single-sourced, which is good for the reasons you stated above.
- Sebastian
  1 commentaire
Dave Walter
Dave Walter le 21 Août 2015
Perfect, this is exactly what I needed.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by