Main Content

Bus to Vector

Convert virtual bus to vector

  • Library:
  • Simulink / Signal Attributes

    HDL Coder / Signal Attributes

  • Bus to Vector block

Description

The Bus to Vector block converts a virtual bus to a vector signal. The input bus must consist of scalars or 1-D, row, or column vectors that have the same data type, signal type, and sampling mode. If the input bus contains row or column vectors, the output is a row or column vector, respectively. Otherwise, the output is a 1-D array.

Use the Bus to Vector block only to replace an implicit bus-to-vector conversion with an explicit conversion. To identify and correct buses used as vectors without manually inserting Bus to Vector blocks, you can use Model Advisor check Check bus signals treated as vectors. Alternatively, you can use the Simulink.BlockDiagram.addBusToVector function, which automatically inserts Bus to Vector blocks wherever needed.

Note

If you use Save As to save a model in a version of the Simulink® product before R2007a, a null subsystem that outputs nothing replaces each Bus to Vector block. Before you can use the model, reconnect or otherwise correct each path that used to contain a Bus to Vector block but now is interrupted by a null subsystem.

Ports

Input

expand all

An input bus must consist of scalars or 1-D, row, or column vectors that have the same data type, signal type, and sampling mode. If the input is a nonbus signal, the block does no conversion.

Data Types: single | double | half | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point | enumerated
Complex Number Support: Yes

Output

expand all

The dimensions of the output vector depend on the dimensions of the input bus elements. If the input bus contains row or column vectors, the block output is a row or column vector, respectively. Otherwise, the output is a 1-D vector.

Data Types: single | double | half | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | fixed point | enumerated
Complex Number Support: Yes

Block Characteristics

Data Types

Boolean | bus | double | enumerated | fixed point | half | integer | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

Version History

Introduced in R2007a