Model Reference with bus object

10 次查看(过去 30 天)
Mikel Ituarte Gil
Mikel Ituarte Gil 2023-3-15
回答: Rijuta 2023-4-19
Hi,
So I used to work in Simulink R18a, and when you created a Model Reference from a subsystem that had buses as inputs or outputs, it would create its bus objects automatically. Now I'm working with R20a, and when I do that, instead it creates In/Out Bus Element ports and creates the whole bus structure, which in my opinion makes the model less clear and more complicated to modify if I have to add/remove a signal in a bus.
Is there any way of changing to how it used to work?

回答(1 个)

Rijuta
Rijuta 2023-4-19
Hi Mikel,
I understand that you are trying to use the Model Reference Blocks in R20a in a similar way to R18a, where buses were automatically created.
In Simulink R20a, the behaviour of Model Reference blocks when generating bus objects from subsystems has changed. If you prefer the previous behaviour where bus objects were automatically created, you can adjust the settings in Simulink to match that behaviour. Please follow the steps below to achieve this.
  1. Open the Simulink Model Configuration Parameters dialog by going to the Simulink menu and selecting "Model Configuration Parameters".
  2. In the dialog, go to the "Model Referencing" tab.
  3. Under the "Signal and bus object interfaces" section, you will see a setting called "Create bus objects for root-level inports and outports". By default, it is set to "In/Out Bus Element ports", which is causing the behaviour you described.
  4. To change it back to the previous behaviour, select "Bus objects" from the dropdown menu.
  5. Click on "OK" to apply the changes.
Note that this change will apply to all Model Reference blocks in your model, so make sure to consider the impact on other parts of your model before making this change.

类别

Help CenterFile Exchange 中查找有关 Composite Interfaces 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by