The Signal Routing library provides three blocks that you can use for implementing buses:
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:
Clone a Bus Creator and Bus Selector block from the Signal Routing library.
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:
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).