Bus Assignment
Replace specified bus elements
- Library:
金宝appSimulink /信号路由
HDL Coder / Signal Routing
Description
TheBus Assignmentblock assigns the values of an input element to bus elements. Use aBus Assignmentblock to change bus element values without addingBus SelectorandBus Creatorblocks that select bus elements and reassemble them into a bus.
Connect the bus to the first input port. To other input ports, connect one or more elements whose values you want to assign to a bus element. Use the Block Parameters dialog box to specify the bus elements to be replaced. The block displays an assignment input port for each such element. For an example of a model that uses a Bus Assignment block, seeReplace Values of Bus Elements。
By default, Simulink®repairs broken selections in theBus AssignmentBlock Parameters dialog boxes 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, in theModel Configuration Parameters>Diagnostics>Connectivitypane, set theRepair bus selectionsdiagnostic to没有修理错误
。
Limitations
When using arrays of buses with aBus Assignmentblock, these limitations apply:
You can assign or replace a nested bus that is an array of buses. For a bus that is nested inside an array of buses, seeAssign into Arrays of Buses。
To replace an element in an array of buses, use aSelectorblock to select the index for the bus element that you want to use with theBus Assignmentblock. Then, use that selected bus element with theBus Assignmentblock.
Ports
Input
Output
Parameters
Model Examples
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|