MATLAB: How to make an array of bus signals in Simulink

arraybussimulinkstateflowstructtype

I would like to create an array of bus signals.

Best Answer

This enhancement has been incorporated in Release 2010b (R2010b). For previous product releases, read below for any possible workarounds:
The ability to have an array of bus signals is not available in Simulink.
To work around this issue, you can create an array of Simulink.StructType signals. However, individual signals cannot be selected from the Simulink.StructType signal as they can with buses.
To work around that limitation you can write an S-Function that will recognize the Simulink.StructType datatype (see S-Function SIMSTRUCT.H), select individual signals, and output the signals as other datatypes and signals in Simulink.
If you would still like to use Buses and Bus Selector blocks, consider creating a nested bus rather than a bus array as shown below:
busarray_signal
+bus1
+bus2
+bus3
Where bus1, bus2, and bus3 would all have the same bus structure.