This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Configure a Subsystem

Subsystem Execution

You can configure a subsystem to execute either conditionally or unconditionally.

Label Subsystem Ports

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.

  1. Select the Subsystem block.

  2. Select one of the labeling options from Diagram > Format > Port Labels menu (for example, From Port Block Name).

Control Access to Subsystems

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.

Note

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 Libraries). For more information about subsystem access options, see the Subsystem block.

Note

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.

Control Subsystem Behavior with Callbacks

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.

See Also

Related Examples

More About