Main Content

Link Model Objects

链接对象s in the Same Model

You can create a requirements link from one model object to another model object:

  1. Right-click the link destination model object and selectRequirements>Select for Linking with Simulink.

  2. Right-click the link source model object and selectRequirements>Add Link to Selected Object.

  3. Right-click the link source model object again and selectRequirements. The new link appears at the top of theRequirementssubmenu.

链接对象s in Different Models

You can create links between objects in related models. This example shows how to link model objects inslvnvdemo_powerwindow_controllerandslvnvdemo_powerwindow.

  1. Open theslvnvdemo_powerwindow_controllerandslvnvdemo_powerwindowmodels.

  2. In theslvnvdemo_powerwindowmodel window, double-click thepower_window_control_systemsubsystem. Thepower_window_control_systemsubsystem opens.

  3. In theslvnvdemo_powerwindow/power_window_control_systemsubsystem window, right-click thecontrolsubsystem. SelectRequirements>Select for Linking with Simulink.

  4. In theslvnvdemo_powerwindow_controllermodel window, right-click thecontrolsubsystem. SelectRequirements>Add Link to Selected Object.

  5. Right-click theslvnvdemo_powerwindow_controller/controlsubsystem and selectRequirements. The new RMI link appears at the top of theRequirementssubmenu.

  6. To verify that the links were created, in theAppstab, clickRequirements Manager. In theRequirementstab, clickHighlight Links.

    The blocks with requirements links are highlighted.

  7. Close theslvnvdemo_powerwindow_controllerandslvnvdemo_powerwindowmodels.