How to create a bus communication with System Composer ?

조회 수: 59 (최근 30일)
Frédéric Schenker
Frédéric Schenker 2021년 7월 5일
댓글: Josh Kahn 2023년 12월 7일
Hello,
I'm beginner with System Composer and I am trying to create a bus communication between 2 slaves and 1 master. The connector elements only allow a port-to-port connection. I don't find how to represent the 2 slaves/1 master architecture with the model.
Is there a solution for this ? or an workaround if there is no solution ?
Thanks in advance

답변 (2개)

Josh Kahn
Josh Kahn 2021년 9월 7일
Hi Frédéric,
To go from one output to many inputs, you can branch the signal by right-clicking the connector and dragging to the next port.
To go from many outputs to one input, you must first use an interface adapter:
Hope this helps!
Josh
  댓글 수: 2
Andrea
Andrea 2023년 12월 7일
Hi,
thanks for your answer. I am trying now to go from many inputs to one output (so the contrary to the interface adapter), and I cannot find a block that does this. What would be the solution?
With interface adapter I have created a bus that contains several messages. And now I want to be able to use this bus to select specific messages. Kind of what would be the equivalent to bus selector in simulink.
Thank you!
Josh Kahn
Josh Kahn 2023년 12월 7일
Architecture Ports (the ones on the system bounding box) support dot notation for element selection. You can take advantage of this inside the components themselves to further decompose a signal, or you can also use a component as a many-to-many router.
See my answer here for an example:
Hope this helps,
Josh

댓글을 달려면 로그인하십시오.


Yongjian Feng
Yongjian Feng 2021년 7월 5일
편집: Yongjian Feng 2021년 7월 5일
Yes, it is doable. First create the bus from the source to the first destination.
Then hold down the control key of your keyboard and then click on any point of the bus. Now you can drag to the second destination.
  댓글 수: 3
Yongjian Feng
Yongjian Feng 2021년 7월 6일
There are complex cases to handle if changing direction or bidirection are supported.
Please accept the answer if it works.
Thanks,
Yongjian
Stefan
Stefan 2023년 2월 22일
Is this:
"Then hold down the control key of your keyboard and then click on any point of the bus. Now you can drag to the second destination."
Possible by using commands?
I have a script, where components with ports are generated. And while its possible to connect to ports from components with the same name once, it fails to connect a output port again to another, second input port.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 System Composer에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by