Limit Model Checks by Excluding Gain and Outport Blocks
This example shows how to exclude a Gain block and all Outport blocks from a Model Advisor check during a Model Advisor analysis. By excluding individual blocks from checks, you limit the scope of the analysis and might save time during model development and verification.
- At the MATLAB® command line, enter : - openExample('sldemo_mdladv')
- From the model window, in the Modeling tab, select Model Advisor to open the Model Advisor. A System Selector dialog opens. Click OK. 
- In the left pane of the Model Advisor window, expand By Product > Simulink. 
- Run the selected checks by clicking the Run checks button. 
- After the Model Advisor runs the checks, click Reports, an HTML report is generated that displays the check results in a browser window. The check Identify unconnected lines, input ports, and output ports triggers a warning. 
- In the left pane of the Model Advisor window, select the check By Product > Simulink > Identify unconnected lines, input ports, and output ports. 
- In the Report section, you can find more information about the check results and how to fix the warning condition. 
- After reviewing the check results, exclude the Gain2 block from all Model Advisor checks: - In the model window, right-click the Gain2 block and select Model Advisor > Exclude block only > All checks.  
- In the Model Advisor Exclusion Editor dialog box, in the Rationale field, enter - Exclude gain block.
- Click OK to store the exclusion in the model file. 
 
- After reviewing the check results, exclude all Outport blocks from the Identify unconnected lines, input ports, and output ports check: - Right-click the Out4 block and select Model Advisor > Exclude all blocks of type Outport > Select Checks > Identify unconnected lines, input ports, and output ports. 
- In the Model Advisor Exclusion Editor dialog box, click OK to store the exclusion in the model file. 
 
- In the left pane of the Model Advisor window, select By Product > Simulink and then click Run Checks to run a Model Advisor analysis. 
- After the Model Advisor completes the analysis, Use the Report button to generate a report, and you can view exclusion information for the Identify unconnected lines, input ports, and output ports check in the: - HTML report:  
 - Model Advisor window. In the left pane of the Model Advisor window, select By Product > Simulink > Identify unconnected lines, input ports, and output ports.  
 
- Close - sldemo_mdladv.