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!