Subsystems

Subsystems allow you to simplify a schematic by establishing a hierarchy, where a Subsystem block is on one layer and the elements that make up the subsystem are on another. Subsystems also enable you to create your own reusable components. For more information see Masking Subsystems.

You can create a subsystem in two ways:

  • Add a Subsystem block to your schematic, then open that block and add the blocks it contains to the subsystem.

  • Select a number of blocks, then group those blocks into a subsystem.

Creating a Subsystem by Adding the Subsystem Block

To create a new subsystem, first add a Subsystem block to the schematic, then add the elements that make up the subsystem:

  1. Copy the Subsystem block from the System library into your schematic.

  2. Double-click on the Subsystem block in order to open it.

  3. In the empty Subsystem window, build the subsystem. Use the different port blocks (e.g. Signal Inport, Signal Outport or Electrical Port) to configure the interface of the subsystem.

Creating a Subsystem by Grouping Existing Blocks

If a schematic already contains the blocks you want to convert to a subsystem, you can create the subsystem by grouping those blocks:

  1. Select the blocks and connections that you want to include in the subsystem within a bounding box.

  2. Choose Create subsystem from the Edit menu. PLECS replaces the selected blocks with a Subsystem block.

Arranging Subsystem Terminals

When you add a port to a subsystem schematic, a corresponding terminal appears at a free slot on the border of the Subsystem block. If necessary, the Subsystem block is resized automatically in order to accommodate the new terminal.

You can move a terminal to another free slot on the border by dragging it with the middle mouse button. Alternatively, use the left mouse button while holding the Shift key. While you hold down the mouse button, a circle shows the free slot nearest to the mouse pointer. When you release the mouse button, the terminal is moved.

The figures below show a Subsystem block before, during and after moving a terminal.

Notice how the shape of the cursor changes to crosshairs as you move it into the capture radius of the terminal. When you press and hold down the center mouse button, the cursor shape changes to a pointing hand.

Resizing a Subsystem Block

To change the size of a Subsystem block, select it, then drag one of its selection handles. While you hold down the mouse button, a dashed rectangle shows the new size. When you release the mouse button, the block is resized. The minimum size of a Subsystem block is limited by the number of terminals on each side.

The figures below show a Subsystem block before, during and after resizing.

Notice how the terminals on the right edge of the Subsystem block are shifted after you release the mouse button in order to fit into the new frame. The block height cannot be reduced further because the terminals cannot be shifted any closer.