To use a Variant Subsystem in a design after its variant selections have been implemented, do the following:
- 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, use the expression mode. Otherwise, select label mode. When you select the Variant control mode as label, the Label mode active choice option becomes available. In label mode, Variant control need not be created in the global workspace. You can select an active Variant choice from Label mode active choice 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
expression
mode:
- 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 has been
activated.