Buses in Generated Code
The various techniques for defining buses are essentially equivalent
for simulation, but the techniques used can make a significant difference
in the efficiency, size, and readability of generated code. For example,
a nonvirtual bus appears as a structure in generated code, and only
one copy exists of any algorithm that uses the bus. A virtual bus
does not appear as a structure or any other coherent unit in generated
code, and a separate copy of any algorithm that manipulates the bus
exists for each element. Using buses properly results in efficient
code and visually clean models. If you intend to generate production
code for a model that uses buses, see Optimizing Buses for Code Generation for information
about the best techniques to use.
 | Avoiding Mux/Bus Mixtures | | Composite Signal Limitations |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit