Error: Cannot propogate bus signal from output 1 to input 5

I keep getting this error when I try to run a simulation with a model reference. The signal is created by a subsystem which then transmits the signal to model reference. I created this signal (bus) in the base workspace using the bus editor so the model reference can see it but I keep getting this error when I run the simulation. I have checked many times to make sure the signal in the bus editor and the real one match up and they do!

 Accepted Answer

Have you set the bus object (in the workspace) as the input datatype for the corresponding port inside the referenced model?

5 Comments

Yes I set the bus in the workspace as the input data type for the reference model but I still get the error
I tried running the simulation without the signal connecting the bus to the reference model and I get an error saying:
The input bus to block 'Actuator/Ep_init_with_adaptive_and_grip_mass/Ep_struct' does not match the bus specified by the bus object 'Ep_struct' on the block dialog. The following errors were detected :
However, when I check the errors that were detected they don't exist and as far as I can tell the signals match up but simulink thinks they don't.
Just to be clear, you set the input datatype on the inport inside the referenced model, and not just at the model boundary in the top-level model?
Hi, the problem was that the structure of the bus in the base workspace didn't always match the order of that from the bus going into the workspace as I didn't realise that the order in which elements are placed in a bus actually mattered.
So now it's all working but is there a way to create a script that loads the base workspace bus whenever I load the test harness?
Thank you for the help
Yes, you could program the test harness model's PostLoadFcn callback to run your script that creates/loads the Bus objects. See Model Callbacks for more information.

Sign in to comment.

More Answers (0)

Categories

Products

Tags

Community Treasure Hunt

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

Start Hunting!