Implement Components in Simulink

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.

Create a Simulink Behavior Model

When a component does not require further decomposition from an architecture standpoint, you can design and define its behavior in Simulink.

  1. Right-click the component and select Create Simulink Behavior.

  2. 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 unsaved Simulink behavior models it references must also be saved, and all linked components updated.

Link to an Existing Simulink Behavior Model

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.

Related Topics