![](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?
3 views (last 30 days)
Show older comments
Till Lindemann
on 5 May 2022
Commented: Till Lindemann
on 10 May 2022
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 Comments
Accepted Answer
Josh Kahn
on 6 May 2022
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
More Answers (0)
See Also
Categories
Find more on System Composer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!