Specify properties of buses
Simulink.Bus
objects, used with Simulink.BusElement
objects, specify and validate the properties of a bus. When you
simulate a model or update diagram, Simulink® checks whether buses connected to blocks match specified
Simulink.Bus
objects.
A Bus
object specifies only the architectural properties of a bus. For
example, a bus object can specify element names, hierarchy, order, and data types. A
Bus
object cannot specify the values of the signals in a bus.
A Bus
object is analogous to a structure definition in C: it defines the
members of the bus, but does not create the bus. A Bus
object is also similar to
a cable connector. The connector defines all the pins and their configuration and controls what
types of wires can be connected to it. Similarly, a Bus
object defines the
configuration and properties of the signals that the associated bus must have.
Bus
objects contain Simulink.BusElement
objects. Each BusElement
object specifies the
properties of a signal in a bus, such as its name, data type, and dimension. The order of the
BusElement
objects in the Bus
object defines the order of the
signals in the bus.
A Bus
object can specify properties that were not defined by constituent
signals, but were left to be inherited.
To create and modify Bus
objects in the base workspace or a data
dictionary, you can use the Bus Editor or
MATLAB® commands. You cannot store Bus
objects in model
workspaces.
To use Bus
objects in a model, see Specify Bus Properties with Simulink.Bus Objects.
returns a
busObject
= Simulink.BusBus
object with these property
values:
Description: '' DataScope: 'Auto' HeaderFile: '' Alignment: -1 Elements: [0×0 Simulink.BusElement]
Bus
object is the name of the MATLAB variable to which you assign the Bus
object.To interactively create a Bus
object, use the Bus Editor.
To create Bus
objects from blocks in a model, MATLAB data, and external C code, see Create Bus Objects Programmatically.
Simulink.Bus.cellToObject
| Simulink.Bus.createMATLABStruct
| Simulink.Bus.createObject
| Simulink.Bus.objectToCell
| Simulink.Bus.save