Out Bus Element, Bus Element Out
Specify output that connects to external port
- Library:
Simulink / Ports & Subsystems
Simulink / Sinks
HDL Coder / Ports & Subsystems
HDL Coder / Sinks
Description
The Out Bus Element block, also known as the Bus Element Out block, combines the functionality of an Outport block and a Bus Creator block. This block is of the Outport block type, and all Out Bus Element blocks that use the same port share a dialog box.
For interfaces that include buses composed of many bus elements, Out Bus Element blocks:
Reduce signal line complexity and clutter in a block diagram.
Allow you to more easily make incremental changes to the interface.
Allow access to a bus element closer to the point of usage, avoiding the use of a Bus Creator and From block configuration.
The Out Bus Element block does not support mixing message and signal elements as inputs.
Create Output Bus Element Port
To create an output bus element port for a model component, add an Out Bus Element block in the block diagram of the model component. Alternatively, for a subsystem, click the edge of the Subsystem block and select Create out bus port.
In the model component, the block label uses default values for its two interactive text fields: the port name and the bus element. To change the name of the port associated with the block, edit the first text field in the label by clicking it.
When multiple blocks are associated with the same port and you change the name of the port, all blocks that share the port update to reflect the new port name.
To create another output bus element port, hold Ctrl while you drag an existing Out Bus Element block to a new location. Upon releasing the pointer, click Create New Port.
Add Elements to Output Bus
To output multiple elements, add an Out Bus Element block for each element that you want to include in the bus. This table provides ways to add Out Bus Element blocks for an existing port.
Goal | Action |
---|---|
Add an Out Bus Element block for a new element. | Double-click the Out Bus Element block. In the dialog box
that opens, select Add a new signal
|
Add an Out Bus Element block for a new nested bus. | Double-click the Out Bus Element block. In the dialog box
that opens, select Add a new sub-bus
|
Add an Out Bus Element block for a new element at the same level as an existing element. | Hold Ctrl while you drag an existing Out Bus Element block for the port to a new location. Upon releasing the pointer, click Use Existing Port. |
All element names associated with the port must be unique. You cannot specify the same element name more than once for an output bus element port. Simulink® does not support overlapping writes to the same port.
To change the name or hierarchy of an element at an Out Bus Element block, edit the second text field in the label by clicking it.
To create hierarchy in the output bus, use dots in the part of the label that describes the bus element. Each dot indicates a new level of bus hierarchy.
To reduce the size of the label, you can display only the element name. Select the
block, pause on the ellipsis, and select Compact Notation
from the action bar. To show the bus hierarchy again,
select Expanded Notation
from the action bar.
Pass Block Input to Output Port Without Bus
To pass the block input to the external output port without nesting it in a bus, delete the text from the second text field.
When an Out Bus Element block defines an entire port, the output of the bus element port is the Out Bus Element block input, which may be a nonbus signal.
Modify Port Output
In the dialog box, you can:
Change port and element names.
Reorder bus elements by dragging elements to new locations in the list of elements.
Remove blocks associated with selected elements by clicking the Remove blocks of selected signals button
.
Log Output Data
When you save output data to the workspace or a file, bus data defined by groups of root-level Out Bus Element blocks are logged along with root-level Outport block data.
Ports
Input
Parameters
Model Examples
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
Version History
Introduced in R2017a