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 adding Bus Selector and Bus Creator blocks that select bus elements and reassemble the elements into a bus. 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; it affects only the values of the elements themselves. 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. The new values must match the attributes of the elements in the original bus.
By default, Simulink® repairs broken selections for a Bus Assignment block that are due to upstream bus hierarchy changes. Simulink generates a warning to highlight that it modified the model. To prevent Simulink from making these repairs automatically:
On the Modeling tab of the Simulink Toolstrip, click Model Settings.
Navigate to the Diagnostics > Connectivity pane.
Set the Repair bus selections configuration parameter to
Error without repair
.
Limitations
The Bus Assignment block does not support messages.
A Bus Assignment block cannot replace a bus in an array of buses. Use an Assignment block instead. For more information, see Assign Values into Arrays of Buses.
A Bus Assignment block cannot replace an element of a bus in an array of buses. To select the index of the bus that you want to modify with the Bus Assignment block, use a Selector block. Then, use that selected bus with the Bus Assignment block.
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
Version History
Introduced before R2006a