| Simulink® | ![]() |
Signal Routing
The Bus Creator block combines a set of signals into a bus, i.e., a group of signals represented by a single line in a block diagram. The Bus Creator block, when used in conjunction with the Bus Selector block, allows you to reduce the number of lines required to route signals from one part of a diagram to another. This makes your diagram easier to understand.
To bundle a group of signals with a Bus Creator block, set the block's Number of inputs parameter to the number of signals in the group. The block displays the number of ports that you specify. Connect the signals to be grouped to the resulting input ports. The signals in the bus will be order from the top input port to the bottom input port. See Changing the Orientation of a Block in the Simulink® documentation for a description of the port order for various block orientations.
You can connect any type of signal to the inputs, including other bus signals. To ungroup the signals, connect the block's output port to a Bus Selector port.
Note Simulink software hides the name of a Bus Creator block when you copy it from the Simulink library to a model. |
The Bus Creator block assigns a name to each signal on the bus that it creates. This allows you to refer to signals by name when searching for their sources (see Browsing Bus Signals) or selecting signals for connection to other blocks. The block offers two bus signal naming options. You can specify that each signal on the bus inherits the name of the signal connected to the bus (the default) or that each input signal must have a specific name.
To specify that bus signals inherit their names from input ports, select Inherit bus signal names from input ports from the list box on the block's parameter dialog box. The names of the inherited bus signals appear in the Signals in bus list box.

The Bus Creator block generates names for bus signals whose corresponding inputs do not have names. The names are of the form signaln, where n is the number of the port to which the input signal is connected.
You can change the name of any signal by editing its name on the block diagram or in the Signal Properties dialog box. If you change a name in this way while the Bus Creator block's dialog box is open, you must close and reopen the dialog box or click the Refresh button next to the Signals in bus list to update the name in the dialog box.
To specify that the bus inputs must have specific names, select Require input signal names to match signals below from the list box in the block's parameter dialog box. The block's parameter dialog box displays the names of the signals currently connected to its inputs, or a generated name (for example, signal2) for an anonymous input. You can now use the parameter dialog box to change the required names of the block's inputs.
To change the required signal name, select the signal in the Signals in bus list. The selected signal's name appears in the Rename selected signal field. Edit the name in the field and click Apply or OK.
The Signals in bus list on a Bus Creator block's parameter dialog box displays a list of the signals entering the block. A plus sign (+) next to a signal indicates that the signal is itself a bus. You can display its contents by clicking the plus sign. If the expanded input includes bus signals, plus signs appear next to the names of those bus signals. You can expand them as well. In this way, you can view all signals entering the block, including those entering via buses. To find the source of any signal entering the block, select the signal in the Signals in bus list and click the adjacent Find button. Simulink software opens the subsystem containing the signal source, if necessary, and highlights the source's icon.
The Bus Creator block accepts and outputs real or complex values of any data type supported by Simulink software, including fixed-point data types.
For a discussion on the data types supported by Simulink software, refer to Data Types Supported by Simulink®.

Select Inherit bus signal names from input ports to assign input signal names to the corresponding bus signals. Select Require input signal names to match signals below to specify that inputs must have the names listed in the Signals in bus list. Selecting this option enables the Rename selected signal field.
Specifies the number of input ports on this block.
The Signals in bus list box shows the signals in the output bus. A plus sign (+) next to a signal name indicates that the signal is itself a bus. Click the plus sign to display the subsidiary bus signals. Click the Refresh button to update the list after editing the name of an input signal. Click the Find button to highlight the source of the currently selected signal.
Lists the name of the signal currently selected in the Signals in bus list when you select the Require input signal names to match signals below option. Edit this field to change the name of the currently selected signal.
Select this option to use a bus object to define the structure of the bus created by this block (see Working with Data Objects and the Simulink.Bus class to learn how to create bus objects).
This option is enabled only if you select the Specify properties via bus object option. It specifies the name of bus object used to define the structure of the bus created by this block. At the beginning of a simulation or when you update the model's diagram, Simulink software checks whether the signals connected to this Bus Creator block have the specified structure. If not, Simulink software displays an error message.
This option is enabled only if you select the Specify properties via bus object option. If this option is selected, this block outputs a nonvirtual bus; otherwise, it outputs a virtual bus (see Virtual and Nonvirtual Buses). Select this option if you want code generated from this model to use a C structure to define the structure of the bus signal output by this block.
Note All signals in a nonvirtual bus must have the same sample time, even if the elements of the associated bus object specify inherited sample times. Any bus operation that would result in a nonvirtual bus that violates this requirement generates an error. If you select this option, all of the signals entering the Bus Creator block must therefore have the same sample time. You can use a Rate Transition block to change the sample time of an individual signal, or of all signals in a bus, to allow the signal or bus to be included in a nonvirtual bus. |
Multidimensionalized | Yes |
![]() | Bus Assignment | Bus Selector | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |