How do I initialize buses in Simulink?

9 views (last 30 days)
I have a model containing a Bus Creator block. The bus is then used in a conditionally executed subsystem. Initialization of Simulink buses is needed, in cases where a Simulink bus is the output of conditionally executed subsystems or unit delay blocks.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The ability to initialize buses is not available in Simulink. Only Simulink buses of the same datatype may be initialized using the following workaround.
To work around this issue, in the output port of the subsystem a vector of the correct number of bus elements may be specified for the "Initial Output" parameter: [1 1 1 1]. This vector can be used regardless of the hierarchical breakdown of the bus.

More Answers (0)

Categories

Find more on Composite Interfaces in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!