Buses could be useful to concatenate different signals from a model into one simple signal. Any information from the bus can be retrieved and reused anywhere onto the sketch. This should ease readability of the sketch and facilitate usage of the model.
1- Create a busTo create a bus you need to use the bussource component. To add information to this bus, you need to use the busadd component:
![image.png](media/0EMKZ000000LeIg)
Here is an example of a sketch using buses:
![image.png](media/0EMKZ000000LeIH)
In this example, there is one main bus called BUS_1. It contains 4 elements: 3 signals and another bus. To display the bus architecture, you can double-click on the bus source component in parameter or simulation mode:
![image.png](media/0EMKZ000000LeIM)
Here you can double-click any item of the list and change its name. This can also be done from the parameters of every single component but it's easier to use the bus viewer window.
2- Retrieve bus information To use one of the signals contained inside the bus created, you need to use the busget component:
![image.png](media/0EMKZ000000LeIR)
You can retrieve any information from the bus on the bottom port (port 1). Instead of typing the variable name in its parameter, it is better to double-click the icon of the busget you want to edit, to open the bus viewer. Here just select the variable you want to use as output for the selected component:
![image.png](media/0EMKZ000000LeIb)
Using the bus viewer should avoid mistake as you can just click the variable you need to directly update the
variable name parameter of the component.
You can also extract an entire bus with the busget component: