In order to create and build a subsystem, which has an Inport block feeding into a Bus Selector block, perform the following steps:
1. Double click on the Inport Block to view the Block Properties. Click on the Signal Specification tab and check ‘Specify properties via bus object’. Keep the default name as ‘BusObject’. You will have to do this for the Inport blocks at the root level and also within the subsystem.
2. Create the bus object, BusObject, by using the Bus Editor. To create the bus object and edit its properties execute the following code at the MATLAB command prompt:
BusObject = Simulink.Bus
buseditor
In the resulting window, the Bus Editor, add the signals that the input bus will have with the appropriate names. Verify that the change has been saved by typing ‘BusObject’ at the prompt.
3. You should now be able to right click on the system and build it by selecting Real-Time Workshop from the menu.
Best Answer