Test harnesses and reference models
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Adam Filion
on 20 Jul 2012
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:
See Also
Categories
Find more on Sources in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!