Contenuto principale

Define Top-Level Configuration Using Referenced Configurations

R2026b

In Simulink® Variant Manager™, you can use referenced component configurations to build a variant configuration for your top-level model.

Open Example Model

This tutorial uses the example model slexVariantManagerOverviewGS, which comes with a minimal set of variant configurations. You can use this model to follow along with the steps in the tutorial.

modelName = "slexVariantManagerOverviewGS";
open_system(modelName);

Define Top-Level Configuration

For the top-level model slexVariantManagerOverviewGS, create a variant configuration that uses a linear controller and a trial plant without noise input.

Open Variant Manager.

  1. Add a new configuration and name it LinearTrial.

  2. Open the Referenced Configurations tab for this configuration.

    For the Controller component, select the Linear configuration.

    For the Plant component, select the TrialNoNoise configuration.

  3. Check the Control Variables table. You can see that all variant control variables from the selected component configurations are automatically included in the top-level configuration. These variables are read-only and appear dimmed.

  4. Activate the LinearTrial configuration. The linear controller and the trial plant without noise input become active.

Tip

To see where a control variable is used in the model hierarchy, right-click the variable in the Control Variables table and select Show usage. The rows where the variable is used are highlighted in the model hierarchy table under the relevant tabs. For example, if variant parameters use the variable, you can find it highlighted in the Variant Parameters tab.

Variant Manager for the top level model shows the component configurations view with the selected configurations for the controller and plant components. The control variables table shows the control variables populated using the selected configurations.

Open Completed Model

You can also access a fully set-up version of the models used in this tutorial, which already includes all configurations. To open this version, use this command.

open_system("slexVariantManagerOverview");

See Also

Topics