Difference b/w virtual and non virtual bus?
222 次查看(过去 30 天)
显示 更早的评论
hey, can anyone explain me the difference b/w virtual and non virtual bus? if possible, give a real life example for better understanding.
0 个评论
回答(2 个)
Guy Rouleau
2012-4-26
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.
1 个评论
Kaustubha Govind
2012-4-26
编辑:Rena Berman
2022-4-1
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 个评论
Guy Rouleau
2012-4-26
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!