Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Using the Bus Object API

The Simulink software provides all Bus Editor capabilities programmatically. Many of these capabilities, like importing and exporting M-files and MAT-files, are not specific to bus objects, and are described elsewhere in the MATLAB and Simulink documentation.

The classes that implement bus objects are:

Simulink.Bus

Specify the properties of a signal bus

Simulink.BusElement

Describe an element of a signal bus

The functions that create and save bus objects are:

Simulink.Bus.createObject

Create bus objects for blocks, optionally saving them in an M-file in a specified format

Simulink.Bus.cellToObject

Convert a cell array containing bus information to bus objects in the base workspace

Simulink.Bus.objectToCell

Convert bus objects in the base workspace to a cell array containing bus information

Simulink.Bus.save

Export specified bus objects or all bus objects from the base workspace to an M-file in a specified format

In addition, when you use Simulink.SubSystem.convertToModelReference to convert an atomic subsystem to a referenced model, you can save any bus objects created during the conversion to an M-file.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS