I am converting subsystem that currently use Bus Select / Bus Assign blocks to using Bus Element In / Bus Element Out blocks.
In my original model, I have an Input port with data type = Some_Bus (defined in the global workspace using the bus editor), and then a Bus Selector. This enforces that bus definitions match whenever I reuse my subsystem (I am using subsystem reference, don't know if that matters).
Now when using In Bus Element, if I set the data type of the bus to Some_Bus, I get the error
Input bus type mismatch on Signal Specification block. The bus signal at the input of '<hidden_signal_specification_block> inserted for "InBus.a" (untitled/Subsystem/In Bus Element)' is a 'nonvirtual bus', however the block expects a 'virtual bus' as per the setting specified for 'Require nonvirtual bus' in the dialog of the signal specification block. This message is related to a hidden SignalSpecification block. This block is added to lock down the specification as defined by the parameters of 'untitled/Subsystem/In Bus Element' for individual elements in the input bus signal.'
The documentation of Bus Element In mentions 'Do not specify a bus object as the expression', but I do not know whether this applies to the individual signal or to the top-level input.
So, is it possible to somehow specify the bus type of the input/output ports of a subsystem when using Bus Element In/Out blocks?
A minimal example is attached. The .mat file contains the bus definition used in this example.