![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/989295/image.gif)
Is it possible to add/edit ports after adding Simulink behavior to an architecture component?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello everyone,
i have created a model architecture with all the ports and according interfaces. However, I still have to tweak some of the buses and interfaces. As a next step, I started adding the component behavior. Now, I accedentally deleted the last outport of the component. To fix this, I tried to add a new output port from the library by adding a "bus element out" to the simulink behavior model. The new output port does show up in the outside view of the component.
The problem I am now facing is that I cannot assign the according interface anymore, since the new out bus does not seem to be compatible.
I hoped adding the interface would re-render the out bus of the behavior model in a fashion that it would have all the signals from the interface.
I would really love to fix this because otherwise I feel, I will be very inflexible with my modelling and have to think twice about how many interfaces I will need before adding the simulink behavior to a component.
Thank you very much!
0 件のコメント
採用された回答
Josh Kahn
2022 年 5 月 6 日
Hey there,
After converting the component to a reference component, the newly created reference model becomes your single source of truth (which is why it becomes read-only in System Composer). Interfaces in System Composer are Buses in Simulink so as long as your interface is in a data dictionary that is shared with the Simulink Model then you just have to define the bus for the bus element port.
Here is a link to the doc on bus element ports:
And here is a quick gif I made to help out.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/989295/image.gif)
Happy Architecting!
Josh
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!