Check use of default variants
Check ID:
mathworks.maab.na_0036
Guideline: na_0036: Default variant
Check use of default variants in a variant subsystem.
Description
Checks Variant Subsystem, Variant Source, Variant Sink, and variant Model blocks in a variant subsystem for a default variant.
This check requires a Simulink® Check™ license.
Check Parameterization
To set the active variant as the default variant, use the Model Advisor Configuration Editor.
Open the Model Configuration Editor and search for check ID
na_0036
.Under Input Parameters, select Check use of 'Allow zero active variant controls' option.
For each Output ports of the variant subsystem, set the following block parameters:
Select Specify output when source is unconnected
Enter a Constant value
Set the output block parameter Data type to
Inherit: auto
Click Apply and save the configuration.
Results and Recommended Actions
Condition | Recommended Action |
---|---|
The subsystem does not contain a default variant. | Set block parameter Variant control to
|
Block parameter Variant Control is set to
Variant . | To set the active variant as the default variant.
|
Capabilities and Limitations
Runs on library models.
Analyzes content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts
Allows syntax highlighting