Difference b/w virtual and non virtual bus?
Ältere Kommentare anzeigen
hey, can anyone explain me the difference b/w virtual and non virtual bus? if possible, give a real life example for better understanding.
Antworten (2)
Guy Rouleau
am 26 Apr. 2012
9 Stimmen
A virtual bus is just a visual representation in the Simulink editor. It makes your model look nicer and easier to manage when you have many signals. It does not affect how the signal is stored in memory.
With a nonvirtual bus, the data is stored as a structure in a contiguous piece of memory. Because of that, nonvirtual have more constraints.
Consider nonvirtual bus only if you have code generation constraints requiring it.
2 Kommentare
Aditya gandi
am 8 Jun. 2017
Can you provide any real life examples to support your statements?
Corey Lagunowich
am 5 Jun. 2026 um 12:57
Virtual buses are so-named because they don't have a "real-life" equivelent. They are for graphical convenience and improve model readability. Non-virtual buses can be likened to bundled wire harnesses in an automobile, where each individual wire carries a different signal, but all the wires are wrapped together and are routed together through the car.
Kaustubha Govind
am 26 Apr. 2012
Bearbeitet: Rena Berman
am 1 Apr. 2022
2 Stimmen
A bus signal is simple a structure signal containing numeric elements. When a bus signal has a Simulink.Bus object associated with it, it becomes a non-virtual bus. See the blog post Nonvirtual Bus Signals for a more detailed explanation. The documentation on Types of Composite Signals also is a good reference.
AFAIK, there is no "real world" example - the difference is only in how Simulink treats the signals.
2 Kommentare
Guy Rouleau
am 26 Apr. 2012
A little precision... virtual buses can have a an associated bus object. This is not required, but can be be used for validation or initialization.
Non-virtual buses need a bus object.
Kaustubha Govind
am 27 Apr. 2012
Ah! There's something new I learned today. :)
Kategorien
Mehr zu Composite Interfaces finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!