Simulink.BlockDiagram.addBusToVector
Convert virtual bus signals into vector signals by adding Bus to Vector blocks
Syntax
Description
[
searches a model, excluding any library blocks, for bus signals used implicitly as vectors,
and returns the results of the search.destBlocks
,busToVectorBlocks
,ignoredBlocks
]
= Simulink.BlockDiagram.addBusToVector(model
)
[
searches a model, and if destBlocks
,busToVectorBlocks
,ignoredBlocks
]
= Simulink.BlockDiagram.addBusToVector(model
,includeLibs
)includeLibs
is true
,
includes in the search library blocks for bus signals used implicitly as vectors.
[
searches a model, and if destBlocks
,busToVectorBlocks
,ignoredBlocks
]
= Simulink.BlockDiagram.addBusToVector(model
,includeLibs
,reportOnly
)reportOnly
is set to false
,
then the function inserts a Bus to Vector block into each bus that is used
as a vector in any block that it searches. The insertion replaces the implicit use of a bus
as a vector with an explicit conversion of the bus to a vector. The source and destination
blocks of the signal do not change.
If Simulink.BlockDiagram.addBusToVector
adds Bus to
Vector blocks to the model or any library, the function changes the saved copy of
the diagram.
If Simulink.BlockDiagram.addBusToVector
changes a library block, the
change affects every instance of that block in every model that uses the library.
[
searches a model, and if destBlocks
,busToVectorBlocks
,ignoredBlocks
]
= Simulink.BlockDiagram.addBusToVector(model
,includeLibs
,reportOnly
,strictOnly
)strictOnly
is true
, the
function checks for input bus signals used implicitly as vectors that are fed into one of
these blocks. These blocks cannot take virtual bus signals, but they can accept nonvirtual
bus signals:
Delay
Selector
Assignment
Vector Concatenate
Reshape
Permute Dimensions
Examples
Input Arguments
Output Arguments
Tips
Before you execute this function:
Check that the model compiles without error.
Save the model.
Back up the model and any libraries before calling the function with
reportOnly
set tofalse
.To preview the effects of the change on blocks in all models, call
Simulink.BlockDiagram.addBusToVector
withincludeLibs
set totrue
andreportOnly
set totrue
. Then, examine the information returned in thedestBlocks
output argument.
Version History
Introduced in R2007a