Simulink Reference    
Subsystem, Atomic Subsystem

Represent a system within another system

Library

Ports & Subsystems

Description


A Subsystem block represents a subsystem of the system that contains it. The Subsystem block can represent a virtual subsystem or a true (atomic) subsystem (see Atomic Versus Virtual Subsystems), depending on the value of its Treat as Atomic Unit parameter. An Atomic Subsystem block is a Subsystem block that has its Treat as Atomic Unit parameter selected by default.

You create a subsystem in these ways:

The number of input ports drawn on the Subsystem block's icon corresponds to the number of Inport blocks in the subsystem. Similarly, the number of output ports drawn on the block corresponds to the number of Outport blocks in the subsystem.

See Creating Subsystems for more information about subsystems.

Data Type Support

A subsystem's enable and trigger ports accept any data type, including fixed-point data types, except int64 and uint64. See Inport for information on the data types accepted by a subsystem's input ports. See Outport for information on the data types output by a subsystem's output ports.

Parameters and Dialog Box

Show port labels
Causes Simulink to display the labels of the subsystem's ports in the subsystem's icon.
Treat as atomic unit
Causes Simulink to treat the subsystem as a unit when determining block execution order. When it comes time to execute the subsystem, Simulink executes all blocks within the subsystem before executing any other block at the same level as the subsystem block. If this option is not selected, Simulink treats all blocks in the subsystem as being at the same level in the model hierarchy as the subsystem when determining block execution order. This can cause execution of blocks within the subsystem to be interleaved with execution of blocks outside the subsystem. See Atomic Versus Virtual Subsystems for more information.
Access
Controls user access to the contents of the subsystem. You can select any of the following values

Access
Description
ReadWrite
User can open and modify the contents of the subsystem.
ReadOnly
User can open but not modify the subsystem. If the subsystem resides in a block library, a user can create and open links to the subsystem and can make and modify local copies of the subsystem but cannot change the permissions or modify the contents of the original library instance.
NoReadOrWrite
User cannot open or modify the subsystem. If the subsystem resides in a library, a user can create links to the subsystem in a model but cannot open, modify, change permissions, or create local copies of the subsystem.
.
Name of error callback function
Name of a function to be called if an error occurs while Simulink is executing the subsystem. Simulink passes two arguments to the function: the handle of the subsystem and a string that specifies the error type. If no function is specified, Simulink displays a generic error message if executing the subsystem causes an error.

Characteristics

Sample Time
Depends on the blocks in the subsystem
Dimensionalized
Depends on the blocks in the subsystem
Zero Crossing
Yes, for enable and trigger ports if present


  Stop Simulation Sum