You can configure a subsystem to execute either conditionally or unconditionally.
An unconditionally executed subsystem always executes.
A conditionally executed subsystem executes based on the value of an input signal. For details, see Conditionally Executed Subsystems and Models.
By default, Simulink® labels ports on a Subsystem block. The labels are the names of the Inport and Outport blocks that connect the subsystem to blocks outside of the subsystem.
You can specify how Simulink labels the ports of a subsystem.
Select the Subsystem block.
Select one of the labeling options (for example, From Block
Name
) from the Port Labels menu on the
Format tab.
You can control user access to subsystems. For example, you can prevent a user from viewing or modifying the contents of a library subsystem while still allowing the user to employ the subsystem in a model.
This method does not necessarily prevent a user from changing the access restrictions. To hide proprietary information that is in a subsystem, consider using protected model referencing models (see Reference Protected Models from Third Parties).
To restrict access to a library subsystem, open the subsystem parameter dialog box and set Read/Write permissions to one of these values:
ReadOnly
: A user can view the contents of the library subsystem
but cannot modify the reference subsystem without disabling its library link or
changing its Read/Write permissions to
ReadWrite
.
NoReadOrWrite
: A user cannot view the contents of the library
subsystem, modify the reference subsystem, or change reference subsystem
permissions.
Both options allow a user to use the library subsystem in models by creating links (see Custom Libraries). For more information about subsystem access options, see the Subsystem block.
You do not receive a response if you attempt to view the contents of a subsystem whose
Read/Write permissions parameter is set to
NoReadOrWrite
. For example, when double-clicking such a
subsystem, Simulink does not open the subsystem and does not display any messages.
You can use block callbacks to perform actions in response to subsystem modeling actions such as:
Handling an error
Deleting a block or line in a subsystem
Closing a subsystem
For details, see Specify Block Callbacks.