Documentation

In Bus Element

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

  • Library:
  • Simulink / Ports & Subsystems

    Simulink / Sources

Description

Note

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.

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.

Ports

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.

Output

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.

Parameters

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

Multidimensional Signals

Yes

Variable-Size Signals

Yes

Extended Capabilities

Introduced in R2017a

Was this topic helpful?