MATLAB Answers

Implementing Model Reference, Data Dictionaries, and Buses

3 views (last 30 days)
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

Accepted Answer

Sebastian Castro
Sebastian Castro on 21 Aug 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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!