Simulink.Bus
Specify properties of buses
Description
ASimulink.Bus
object is a data type that, when used withSimulink.BusElement
objects, specifies and validates the properties of a bus. When you simulate or update a model, Simulink®checks whether buses connected to blocks match theSimulink.Bus
object data types that the blocks specify.
ABus
object specifies only the architectural properties of a bus. For example, a bus object can specify element names, hierarchy, order, and data types. ABus
object cannot specify the values of the signals in a bus.
ABus
object is analogous to a structure definition in C: it defines the members of the bus but does not create the bus. ABus
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, aBus
object defines the configuration and properties of the signals that the associated bus must have.
Bus
objects containSimulink.BusElement
objects. EachBusElement
object specifies the properties of a signal in a bus, such as its name, data type, and dimension. The order of theBusElement
objects in theBus
object defines the order of the signals in the bus.
ABus
object can specify properties that were not defined by constituent signals, but were left to be inherited.
To create and modifyBus
objects in the base workspace or a data dictionary, you can use theBus Editoror MATLAB®commands. You cannot storeBus
objects in model workspaces.
To useBus
objects in a model, seeSpecify Bus Properties with Simulink.Bus Objects.
Creation
Syntax
Description
返回一个name
= Simulink.BusBus
object with default property values. The name of theBus
object is the name of the MATLAB variable to which you assign theBus
object.
Properties
Examples
Alternatives
To interactively create aBus
对象,使用Bus Editor.
To createBus
objects from blocks in a model, MATLAB data, and external C code, seeCreate Bus Objects Programmatically.
See Also
Functions
Simulink.Bus.cellToObject
|Simulink.Bus.createMATLABStruct
|Simulink.Bus.createObject
|Simulink.Bus.objectToCell
|Simulink.Bus.save