Defining bus type when using Bus Element In / Bus Element Out blocks
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
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.
Regards,
Rob
0 comentarios
Respuestas (1)
Ganesh Regoti
el 7 de Nov. de 2019
Hi,
I have gone through the model, even when we set the bus to ‘some_bus’ we can make it work if we convert nonvirtual bus to virtual bus. You can refer the following link for that
I’m also attaching the model.
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Subsystems en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!