All buses combined into an array of buses must:
Have the same bus type (that is, same name, hierarchies, and attributes for the bus elements)
Have no variable-size signals or frame-based signals
These blocks support arrays of buses:
You can use an array of buses as an input to an In Bus Element block, but you cannot use that block to select individual buses. The block passes through the whole array of buses signal.
Using an array of buses signal with some blocks requires specific block parameter settings.
This information is also in the reference pages for each of these blocks. For usage information for bus-related blocks, see Work with Arrays of Buses.
|Block||Block Parameters Settings|
Initial condition — You can specify this parameter with:
Number of data ports — Set to a value of 2 or greater.
Output — Set to
Threshold — Specify a scalar threshold.
To initialize an array of buses with structure parameters, you can use:
0. In this case, all the individual
signals in the array of buses use the initial value
struct that represents the same
hierarchy of fields and field names as the bus type. In this case,
the scalar structure expands to initialize each of the individual
signals in the array of buses.
An array of structures that specifies an initial value for each of the individual signals in the array of buses.
If you use an array of structures, all the structures in the array must have the same hierarchy of fields. Each field in the hierarchy must have the same characteristics across the array:
Numeric data type, such as
You cannot use partial structures.
For more information about specifying initial conditions for bus signals, see Initialize Arrays of Buses.
Simulink® software does not log arrays of buses inside referenced models in rapid accelerator mode.
Stateflow® action language does not support arrays of buses.
A Bus Creator block can accept an array of buses as input, but cannot have an array of buses as output.
After model simulation, the line style for the array of buses signal is a thicker version of the signal line style for a nonvirtual bus signal.
For example, in the
sldemo_bus_arrays model, the
Scalar Bus signal is a nonvirtual bus signal, and the
Bus Array output signal of the Concatenate
block is an array of buses signal.