Is it possible to combine two nonvirtual Simulink buses into a single bus?

7 views (last 30 days)
Hello. I am creating a new model in a shared sim, so I would like to disturb the existing bus structures as little as possible. To do this, I need to combine two nonvirtual buses into a single bus. I have tried using a bus creator, but that just creates a "bus of buses" essentially. When using a vector concatenate followed by a bus creator, I lose the signal names. Is there anyway to combine these two buses robustly, without having to first decompose them using a bus selector and then recombine using a bus creator?
  2 Comments
Fangjun Jiang
Fangjun Jiang on 18 Sep 2025
It's not clear what is the exact use case. If you utilize the "Bus Element In" and "Bus Element Out" blocks, you might be able to avoid this "combine" task.
Will
Will on 18 Sep 2025
Hi Jiang, thank you for your comment. I tried using the "Bus Element Out" with a bus creator to merge the buses, but that just creates a "bus of buses" again where bus1 is indexed as signal1 and bus2 as signal2. I want to do the following:
Take bus1 with signals a and b and merge with bus2 with signals c and d into a signal bus with signals a, b, c, and d. Right now, when I use the "Bus Element Out", I get a new bus3 with signals signal1 and signal2 which themselves have signals a and b, and c and d respectively.
I'm not sure if this is possible, but I would like to investigate so that I impact the larger sim as little as possible. Thank you!

Sign in to comment.

Answers (0)

Categories

Find more on Composite Interfaces in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!