Check usage of Switch blocks
Guideline: jc_0141: Usage of the Switch blocks
Verifies that the Switch block control input (the second input) is a Boolean value and that the block is configured to pass the first input when the control input is nonzero.
This check requires a Simulink® Check™ license.
This check does not include sub-checks because the MAB modeling guideline provides only one sub ID.
For reference, the MAB guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:
NA-MAAB — a
JMAAB — a
Results and Recommended Actions
|The Switch block control input (second input) is not a Boolean value.
|Change the data type of the control input to Boolean.
|The Switch block is not configured to pass the first input when the control input is nonzero.
|Set the block parameter Criteria for passing first input to u2 ~=0.
Capabilities and Limitations
Does not run on library models.
Analyzes content of library linked blocks. By default, the input parameter Follow links is set to
Analyzes content in masked subsystems that have no workspaces and no dialogs.
Allows exclusions of blocks and charts.
This check is supported by edit-time checking. However, edit-time checking for this check does not verify that the data type of the control input is a Boolean value.