Main Content

Composite Interfaces

Group signals or messages to reduce model complexity at component interfaces

To reduce model complexity, group individual signals or messages into composite lines using buses.

Virtual buses meet most modeling requirements for composite interfaces and provide the flexibility to combine different types of signals.

For a comparison of modeling techniques, see Composite Interface Guidelines.

Blocks

expand all

In Bus ElementSelect input from external port
Out Bus ElementSpecify output of external port
Bus AssignmentAssign new values to specified bus elements
Bus CreatorGroup input signals or messages into bus
Bus SelectorSelect elements from input bus
DemuxExtract and output elements of virtual vector signal
MuxCombine input signals of same data type and complexity into virtual vector
SelectorSelect input elements from vector, matrix, or multidimensional signal
Vector ConcatenateConcatenate input vectors of same data type for iterative processing
Matrix ConcatenateConcatenate input matrices of same data type for iterative processing
Bus to VectorConvert virtual bus to vector
Signal ConversionConvert signal to new type without altering signal values

Functions

expand all

Simulink.Bus.addElementToPortAdd element to input bus element port (Since R2022b)
getNumLeafBusElementsNumber of leaf elements in Simulink.Bus object
getLeafBusElementsLeaf elements in Simulink.Bus object
Simulink.Bus Specify properties of buses
Simulink.BusElement Specify properties of elements of buses
Simulink.Bus.cellToObjectCreate Simulink.Bus objects from cell array of bus information
Simulink.Bus.createObjectCreate Simulink.Bus objects from blocks or MATLAB structures
Simulink.Bus.objectToCellCreate cell array of bus information from Simulink.Bus objects
Simulink.Bus.saveSave Simulink.Bus object definitions in function
Simulink.Bus.createMATLABStructCreate MATLAB structures that use same hierarchy and attributes as buses
Simulink.BlockDiagram.addBusToVectorConvert virtual bus signals into vector signals by adding Bus to Vector blocks

Tools

Component Interface ViewDisplay component interfaces to trace port connections and author ports
Signal Hierarchy ViewerView signal hierarchy and trace signal to source or destination
Type EditorCreate, modify, and manage types, such as bus objects

Model Settings

expand all

Unspecified bus object at root Outport blockDiagnostic action to take when root Outport block of referenced model does not specify bus object for bus output
Element name mismatchDiagnostic action to take when bus element name does not match corresponding bus element object name
Bus signal treated as vectorDiagnostic action to take when virtual bus is treated as vector
Non-bus signals treated as bus signalsDiagnostic action to take when nonbus signals are treated as buses
Repair bus selectionsDiagnostic action to take when upstream bus hierarchy changes break selections

Topics

Composite Interface Basics

Visually Group Lines

Modify and Configure Buses

Define Bus Object Data Types

Functionally Group Lines

Simplify Iterative Processing

Related Information

Featured Examples