A variant subsystem can be created by dragging a Variant Subsystem block from the Library Browser into your model. This block will then contain underlying blocks to implement each variant. To create a variant subsystem, do the following:
- Drag a Variant Subsystem block into your model. (The Variant
Subsystem block can be found in the Simulink
Library Browser under Simulink/Ports & Subsystems/Variant
Subsystem.)
- Double-click the Variant Subsystem block.
- Each variant choice is defined in a Subsystem or Model block within
the Variant Subsystem. You can define each variant choice's implementation by
populating the empty Subsystem blocks in the model, or by copying Subsystem or Model
blocks in from elsewhere. Rename each Subsystem block to describe which variant
selection it represents. Note: The Variant Subsystem block inputs and outputs should not be connected; the port connectivity will be determined at runtime based on which variant is active.