Using Simulink |
 |
Creating a Subsystem by Adding the Subsystem Block
To create a subsystem before adding the blocks it contains, add a Subsystem block to the model, then add the blocks that make up the subsystem:
- Copy the Subsystem block from the Signals & Systems library into your model.
- Open the Subsystem block by double-clicking it.
- Simulink opens the subsystem in the current or a new model window, depending on the model window reuse mode that you selected (see Window Reuse).
- In the empty Subsystem window, create the subsystem. Use Inport blocks to represent input from outside the subsystem and Outport blocks to represent external output.
- For example, the subsystem shown includes a Sum block and Inport and Outport blocks to represent input to and output from the subsystem.

| Creating Subsystems | | Creating a Subsystem by Grouping Existing Blocks |  |