This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

In Bus Element

Select bus element or entire bus that is connected to subsystem input port

  • Library:
  • Simulink / Ports & Subsystems

    Simulink / Sources



This block has two different names, depending on the library in which it appears. The functionality of both blocks is the same.

  • In the Sources library and the Ports & Subsystems library — In Bus Element

  • In the Signal Routing library — Bus Element In

Select an element from a bus (or the entire bus) that is connected to the input port of the subsystem. This block integrates into one block the functionality of using an Inport block and a Bus Selector block. The In Bus Element block is of the Inport block type. There are no specifications allowed on an In Bus Element block, which supports only an inherited workflow. You cannot use the Block Parameters dialog box of an In Bus Element block to specify bus element attributes, such as data type or dimensions.

To work with buses at subsystem interfaces, consider using In Bus Element and Out Bus Element blocks. This bus element port block combination:

  • Reduces signal line complexity and clutter in a block diagram.

  • Makes it easy to change the interface incrementally.

  • Allows access to a bus element closer to the point of usage.

    • For input, avoid a duplicate Inport blocks and a Bus Selector, Goto, and From block configuration.

    • For output, avoid a Goto, From, and Bus Creator block configuration.

The In Bus Element block selects signals from a subsystem input port. Feed the output of the In Bus Element block to another block in the subsystem.

For bus input signals, either specify the signal that you want to select from the input port or to pass through the whole bus signal, leave the element empty. For a nonbus input signal for a subsystem, leave the element section of the block icon text empty. The block passes through the value of the nonbus signal. To select multiple signals from an input bus signal, create multiple In Bus Element blocks, one for each selected signal.

To reduce the number of bus element signals displayed in the Block Parameters dialog box, use the Filter box. The Filter box supports regular expressions. To use a regular expression character as a literal, include an escape character (\). For example, to use a question mark: sig\?1.

You can specify the background color for bus element port blocks, using the Block Parameters dialog box Set color option. This action sets the color of blocks associated with selected elements, or to all blocks if you do not select elements.


The block does not have an input port. Use the Block Parameters dialog box or Property Inspector to specify the subsystem input port from which the block receives its input signal.


expand all

The output port passes the value of the selected input signal to another block. The signal can have a real or complex value of any data type that Simulink® supports.


expand all

Specify a name for a subsystem port. That name appears on the Subsystem and In Bus Element block icons. If you specify a port name, that name cannot already be in use by another In Bus Element block or port. All In Bus Element blocks that access the same subsystem input port reflect the port name that you specify.

Programmatic Use

Block Parameter: PortName
Type: text
Default: InBus

Specify the order in which the port appears on the subsystem, with 1 being the top port, 2 the second port down, and so on.

  • If you specify a number that exceeds the number of subsystem input ports, new ports are added above the port associated with the In Bus Element block.

  • If you add an In Bus Element block that creates another subsystem input port, the port number is the next available number.

  • If you delete all In Bus Element blocks associated with a port, other port numbers are renumbered so that the blocks are in sequence and that no numbers are omitted.

Programmatic Use

Block Parameter: Port
Value: integer
Default: 1

Block Characteristics

Data Types

double | single | Boolean | base integer | fixed point | enumerated | bus | string

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

Introduced in R2017a