Is it possible to add/edit ports after adding Simulink behavior to an architecture component?
1 view (last 30 days)
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!
Josh Kahn on 6 May 2022
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.