필터 지우기
필터 지우기

How best to gather signals from all over a SIMULINK model to one subsystem

조회 수: 13 (최근 30일)
Chad Rutherford
Chad Rutherford 2021년 3월 12일
댓글: Chad Rutherford 2021년 3월 15일
Attached is a simple SIMULINK example I created, where several signals are sent via goto blocks to a subsystem. The "get data" subsystem puts all of these values into a mux, and the constant input to this subsytem selects one of them for output. For my actual application this constant value will be a variable in the Matlab workspace, and will depend upon data in a file that is read in before the SIMULINK code is executed. This all works as I want it to, but it is very messy, with goto blocks everywhere cluttering up the model. In my real application I would have quite a lot more of these goto blocks (some coming from libraries too). I am looking for a way to replicate the functionality of this example without using goto blocks. Is there a "cleaner" clutter-free way to do this?
  댓글 수: 1
Aryaman Pandav
Aryaman Pandav 2021년 3월 13일
I'm also keen to hear the answer to this. I have so far not come across a way to do this without using Goto blocks.

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

답변 (1개)

Pat Gipper
Pat Gipper 2021년 3월 14일
I moved your root model into a subsystem and used Bus Element Out(s), which was then connected to a new input on "get data" subsystem that uses Bus Element In(s). This is a little cleaner then Goto/From tags, especially if you use "Compact Notation" which removes the bus name from each element.
  댓글 수: 1
Chad Rutherford
Chad Rutherford 2021년 3월 15일
Thanks for the response. I certainly could do something like this, but I think for a large model it would still be pretty messy. I ultimately want to bring signals together from all over a very large simulation, with multiple libraries and quite a lot of subsystems within subsystems. I think with this I would end up either with lines all over the place feeding into a bus creator subsystem, or I would have the same goto/from problem except this time the "from" blocks would appear in the bus subsystem.

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

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by