Documentation Center

  • Trial Software
  • Product Updates


Create and Access a Bus

The Signal Routing library provides three blocks that you can use for implementing buses:

Bus Creator

Create a bus that contains specified elements

Bus Assignment

Replace specified bus elements

Bus Selector

Select elements from a bus

Each of these blocks is virtual or nonvirtual depending on whether the bus that it processes is virtual or nonvirtual. The Simulink® software chooses the block type, and changes it automatically if the bus type changes.

To create and access a bus signal that has default properties:

  1. Clone a Bus Creator and Bus Selector block from the Signal Routing library.

  2. Connect the Bus Creator, Bus Selector, and other blocks as needed to implement the desired bus.

The next figure shows two signals (s1 and s2) that are input to a Bus Creator block, transmitted as a bus signal (s3_bus) to a Bus Selector block, and output as separate signals.

The Bus Creator and Bus Selector blocks are the left and right vertical bars, respectively. Consistent with the goal of reducing visual complexity, neither block displays a name. The line connecting the blocks (s3_bus), representing the bus signal, is tripled because the model has been built, and the middle line is solid because the bus is virtual. The line would be dashed if the bus were nonvirtual:

Virtual Bus
Nonvirtual Bus

See Signal Line Styles for more about the graphical appearance of signals. You can also display other signal characteristics graphically, as described under Display Signal Attributes.

Simulink automatically labels the output signals of the Bus Selector block to reflect the name of the selected bus elements (for example, in the above model, s1 and s2).

For more information about creating and accessing buses, see the reference documentation for the Bus Creator, Bus Selector, and Bus Assignment blocks.

Was this topic helpful?