Bus and model variants
3 views (last 30 days)
Show older comments
I used to have a variant subsystem and wanted to change to model variant to avoid compiling again and again some parts of the system. So I replace the "Variant Subsystem" block by a "Model Variants" and put all the variants in differents files. But there are bus...
I have data type problems between variants and the root model which contain the "Model variants" block. I looked on this page but I don't understand how to get it done in my case.
I can't specify each signal in the bus : too many bus and some of them are bus of bus...
I can create a bus using :
But then, the bus doesn't have any Elements. So, there is still an error.
I tried :
myBus = Simulink.Bus.createObject(myVariant,myBusCreatorBlock)
But then, in the Outport, the specification isn't "Bus:myBus" but I must select "Bus:slBus1", "slBus1" is "myBus.busName".
This question almost solve my problem, but he use two MAT files which contain Bus definition (including all signals names) that I haven't and can't have.
So, my question is : How to create a nonvirtual bus, without specifying all of his elements manually ?
Find more on Variant Inline Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!