MATLAB: How to rename signals in a bus in Simulink 7.4 (R2009b)

businterfacenamesrenamesignalsimulink

I would like to connect multiple blocks that use buses as inputs and outputs. However the names of the signals in the bus that comes out of one block do not match the names of the signals in the other block. I would like to know if there is an easy way to create an interface between both blocks that 'renames' the signals in the buses instead of extracting all signals from the bus and constructing a new bus from it.

Best Answer

It is possible to create such an interface using an Embedded MATLAB block and a Simulink.Bus object. The Embedded MATLAB block can be used to copy its input to its output, while the structure of the output is determined by the Simulink.Bus object. As an example, load the attached file "my_bus_signals.mat" and run the attached model. You will notice that the signals a, b and c and renamed to d, e and f