To use a Variant Subsystem in your design after implementing its variant selections, follow these steps:
- Create the variant subsystem and insert it into the design at the appropriate
location.
- Right-click the variant block and select Block Parameters. The Block Parameters dialog box for the variant block opens.
- To select the active variant based on the evaluation of the variant
conditions, select expression mode. Otherwise, select
label mode.
When you select the Variant control mode as label, the Label mode active option becomes available. In label mode you do not need to create Variant control in the global workspace. You can select an active Variant choice from Label mode active options.
- Use the options available on the Block Parameter dialog box to add variant controls and
corresponding variant conditions.
The following figure shows an example configuration for
expressionmode. - To activate a variant selection, type the variant name in the
MATLABĀ®
command window. For example, type
VSS_MODE = 2. - Update the model (Ctrl+D) to ensure that the variant selection is
activated.