Subsystems
As a model increases in size and complexity, you can simplify it by grouping blocks into subsystems. A subsystem is a set of blocks that you group into a single Subsystem block.
Using subsystems:
Establishes a hierarchical block diagram, where a Subsystem block is on one layer and the blocks that make up the subsystem are on another.
Keeps functionally related blocks together.
Helps reduce the number of blocks displayed in your model window.
Establishes an interface with inputs and outputs.
When you make a copy of a subsystem, that copy is independent of the source subsystem. To reuse the contents of a subsystem across a model or across models, consider referenced subsystems, referenced models, or subsystems linked to a block in a custom library. For more information, see Explore Types of Model Components.
A subsystem can be virtual or nonvirtual. A virtual subsystem provides graphical hierarchy in a model. A nonvirtual subsystem provides graphical hierarchy and executes as a unit within a model.
Blocks
Subsystem | Group blocks to create model hierarchy |
Functions
Tools
Model Reference Conversion Advisor | Convert subsystems to referenced models |
Referenced Files Pane | View, save, and close referenced subsystems and models (Since R2020b) |
Component Interface View | Display component interfaces to trace port connections and author ports |
Topics
Subsystems
- Explore Types of Subsystems
Decide among virtual and nonvirtual subsystems, including conditionally executed subsystems. - Group Blocks into Subsystems
Use subsystems to organize large models. - Expand Subsystem Contents
Flatten a model hierarchy by bringing the contents of a subsystem up one level. - Connect Subsystems
Add ports to subsystems and configure port labels. - Navigate Model Hierarchy
Navigate model hierarchy using the Explorer Bar and Model Browser. - Preview Content of Model Components
Display representation of block contents on the face of a block. - Trace Connections and Author Ports Using Component Interface View
Display component interfaces to trace port connections and author ports.
Subsystem References
- Create and Use Referenced Subsystems in Models
Reference, reuse, and manage subsystems stored in separate files. - Convert Subsystem to a Referenced Subsystem
This example shows how you can convert a Subsystem block in a model or library to a Subsystem Reference block. - Mask a Subsystem File
Use system mask to customize each instance of a referenced subsystem. - Manage Subsystem Reference Data Using External Data Sources
Use Simulink® data dictionary and MAT files for managing subsystem reference data. - Define Subsystem Reference Interfaces Using Test Harnesses and Generate Reusable Code
This example shows how to define interfaces and generate reusable code for subsystem reference, and how to verify that a model uses the subsystem reference correctly. - Change Subsystem Reference Component Dynamically Using InitFcn
This example shows how to dynamically change the subsystem reference component using the Initialization Function. - Control Subsystem Reference Programmatically
Find, replace, and check referenced subsystems in models.