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!