| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Signal Routing
The Bus Assignment block assigns signals connected to its Assignment input ports (:=) to specified elements of the bus connected to its Bus input port, replacing the signals previously assigned to those elements. The change does not affect the signals themselves, it affects only the composition of the bus. Signals not replaced are unaffected by the replacement of other signals. See Using Composite Signals for information about buses.
Connect the bus to be changed to the first input port. Use the block's dialog box to specify the bus elements to be replaced. The block displays an assignment input port for each such element. The signal connected to the assignment port must have the same structure, data type, and numeric type as the bus element to which it corresponds.
You cannot use the Bus Assignment block to replace a bus that is nested within another bus. Thus no element selected in the dialog box for replacement can be a bus, and no signal connected to an Assignment port can be a bus.
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. All buses and signals input to a Bus Assignment block that modifies a nonvirtual bus 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. See Virtual and Nonvirtual Buses for more information.
The bus input port of the Bus Assignment block accepts and outputs real or complex values of any data type supported by Simulink software, including fixed-point and enumerated data types. The assignment input ports accept the same data types as the bus elements to which they correspond.
For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink.

Displays the names of the signals contained by the bus at the block's Bus input port. Click any item in the list to select it. To find the source of the selected signal, click the adjacent Find button. Simulink software opens the subsystem containing the signal source and highlights the source's icon. Use the Select>> button to move the currently selected signal into the adjacent list of signals to be assigned values (see Signals that are being assigned below). To refresh the display (e.g., to reflect modifications to the bus connected to the block), click the adjacent Refresh button.
Lists the names of bus elements to be assigned values. This block displays an assignment input port for each bus element in this list. The label of the corresponding input port contains the name of the element. You can order the signals by using the Up, Down, and Remove buttons. Port connectivity is maintained when the signal order is changed.
Three question marks (???) before the name of a bus element indicate that the input bus no longer contains an element of that name, for example, because the bus has changed since the last time you refreshed the Bus Assignment block's input and bus element assignment lists. You can fix the problem either by modifying the bus to include a signal of the specified name or by removing the name from the list of bus elements to be assigned values.
Multidimensionalized | Yes |
Virtual | Yes, if the input bus is virtual For more information, see Virtual Blocks in the Simulink documentation. |
![]() | Block Support Table | Bus Creator | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |