Main Content

Share and Reuse Bus-Routing Blocks

With custom libraries, you can share and reuse blocks that input or output buses. For a block linked to a parent library block that expects a bus input, you must provide the appropriate input bus. For example, the input bus for a Bus Selector block that is linked to a library must contain signals that have the same name as the signals that the parent library block selects.

To modify the parent library block, perform these steps. For details about modifying library links, see Linked Blocks.

  1. Copy the parent library block to a model.

  2. Connect a bus to the input port of the block.

  3. Disable the link to the parent library block.

  4. Edit the block within the context of the model.

  5. Resolve the link to the library.

  6. In the Link Tool, in Push/Restore Mode, select Push to place the edited content in the library.

  7. Save the library.

To lock the interface of a parent library block, set its data type to a Simulink.Bus object.

With subsystem references, you can share and reuse a subsystem containing blocks that input or output buses and their associated signal lines. For more information, see Create and Use Referenced Subsystems in Models.

See Also


Related Topics