Check usage of Switch blocks
Check ID:
mathworks.maab.jc_0141
Guideline: jc_0141: Usage of the Switch blocks
Description
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.
Check Parameterization
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
Condition | Recommended Action |
---|---|
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
on
.Analyzes content in masked subsystems that have no workspaces and no dialogs.
Allows exclusions of blocks and charts.
Edit-Time Checking
This check is supported by edit-time checking.