System design and architecture definition can involve a behavior definition for some components, such as the algorithm for a data processing component. Components in System Composer™ architecture models can define behavior using Simulink® models by linking components to Simulink models.
When a component does not require further decomposition from an architecture standpoint, you can design and define its behavior in Simulink.
Right-click the component and select Create Simulink Behavior.
Provide a model name. The default name is the name of the component.
A new Simulink model with the provided name is created. The root level ports of the Simulink model reflect the ports of the component.
The component in the architecture model is linked to the Simulink model. The Simulink icon on the component indicates this is a Simulink link.
You can continue with providing specific dynamics and algorithms in the referenced Simulink model. Adding root-level ports in the Simulink model creates additional ports on the System Composer Reference Component block.
You can access and edit a referenced Simulink model by double-clicking the component in the architecture model. When you save the architecture model, all unsavedSimulink behavior models it references must also be saved, and all linked components updated.
You can link to an existing Simulink behavior model from a System Composer component, provided that the component is not already linked to a reference architecture. Right-click the component and select Link to Model. Type in or browse for the name of a Simulink model.
Any subcomponents and ports that are present in the components get deleted when the component links to a Simulink model.