How to connect bus signal with different data size using multiport switch?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
I have two subsystems, and I want to minimized the data size for the signal that is been transfered in between the subsystems. The following figure shows the ideal case. When Constant1 = 1, the first signal with size {1} is transmitted; when Constant1 = 2, the second signal with size {2} is transmitted; Unfortunately, there will be error pop-up regarding to data size mistmatching in this model, which is attached. How could I solve this error or is there other approach to minized this data size. Noted that the constant value should be constant during the simulation.

Regards,
Andy
댓글 수: 0
채택된 답변
Mark McBroom
2021년 1월 4일
I made a number of changes to your model, most importably was to remove mux blocks. Mux blocks should not be used. Use Vector/Matrix concat blocks to create vectors/matrices, use Bus Creater blocks to create buses.
추가 답변 (1개)
Mark McBroom
2021년 1월 1일
On the Multi-port switch block, on the Signal Attirbutes tab, check the box "Allow different data input sizes".
참고 항목
카테고리
Help Center 및 File Exchange에서 Blocks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
