Bus Assignment
Assign new values to specified bus elements
Libraries:
Simulink /
Signal Routing
HDL Coder /
Signal Routing
Description
The Bus Assignment block assigns the values of input signals to selected bus elements. Use a Bus Assignment block to change bus element values without extracting bus elements and reassembling the bus with the desired elements. A Bus Assignment block simplifies updating a bus to reflect the processing that occurs in a separate component, such as a subsystem or referenced model.
The Bus Assignment block assigns elements connected to its assignment input ports to specified elements of the bus connected to its bus input port. The block replaces the elements previously assigned to those elements. The change does not affect the composition of the bus. The change affects only the values of the elements. Signals not replaced are unaffected by the replacement of other elements.
The elements to which you assign values can be nonbus signals or buses, including arrays of buses, as long as they are elements of the input bus. The new values must match the attributes of the elements in the original bus.
By default, the software repairs broken selections for a Bus Assignment block
that are due to upstream bus hierarchy changes. A warning notifies you when a repair modifies
the model. To prevent the software from making these repairs automatically, set the
Repair bus selections configuration
parameter to Error without repair
.
Examples
Extended Examples
Limitations
The Bus Assignment block does not support messages.
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Tips
To replace a bus in an array of buses. Use an Assignment block instead. For an example, see Model Arrays of Buses.
To replace an element of a bus in an array of buses, select the index of the bus that you want to modify by using a Selector block. Then, use the selected bus as input to the Bus Assignment block.
Extended Capabilities
Version History
Introduced before R2006a