Buses and Libraries
When you define a library block, the block can input, process,
and output buses just as an ordinary subsystem can. The MathWorks
recommends not using Bus Selector blocks in library blocks, because
such use complicates changing the library blocks and increases the
likelihood of errors. When a Bus Selector block appears in a library
block, the following considerations and recommendations apply:
You cannot change a Bus Selector block directly within
a library. To change the Bus Selector block, copy the library block
that uses it to a model, edit the Bus Selector block within the context
of the model, then copy the changed library block back to the library.
The Inport that feeds the Bus Selector block should
have an associated bus object, as described in Using Bus Objects. This bus object must be stored in an M-file
or MAT-file, and imported into the base workspace of any model that
subsequently uses the library block.
Any model that uses the library block containing the
Bus Selector should set Configuration Parameters
> Connectivity > Element name mismatch to error.
This setting minimizes the possibility of consistency errors at the
interface to the library block.
See Working with Block Libraries for
information about creating block libraries and copying library blocks
to and from them.
 | Connecting Buses to Inports and Outports | | Avoiding Mux/Bus Mixtures |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit