Test harnesses and reference models
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I am making a test harness in simulink to test an actuator model and have ran into a problem. The actuator itself is a reference model so I can quickly switch out different actuator model. However, I have a signal going into the model which is a bus signal, the bus signal itself is comprised of buses within buses etc.
So I had to write some code in the base workspace so that the model would see the incoming signal as a bus, the problem is the bus structure is different when it goes into the model in that it is just a long list of signals rather than having the hierarchy of the bus signal in the test harness.
So when I run this code and start the simulation the model can find the signals it needs easily enough but I get an error message that says.
Cannot propagate bus signal from output port 1 of 'Actuator/Bus Creator' to input port 5 of 'Actuator/Actuator' because the destination block expects a bus signal with different structure than the signal that is connected to it
So does anyone have any ideas? I'm thinking I can edit the code to mimic the hierarchy.
Thanks in advance for any advice.
댓글 수: 0
답변 (1개)
Adam Filion
2012년 7월 20일
First I would double check that you are using virtual vs non-virtual buses where appropriate.
There's a good blog post here that shows an easy way to do this for a constant testing signal:
And a file here that will create a bus test harness that you can modify for non-constant signals:
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!