With Simulink® Check™, the Model Advisor can check for model conditions that cause generation of inefficient code or code unsuitable for safety-critical applications.
The Model Advisor produces a report that lists the suboptimal conditions or settings that it finds. The Model Advisor proposes better model configuration settings.
In the Model Advisor, you can check that your model complies with certain guidelines while you edit.
To use edit-time checking, on the Modeling tab, select Model Advisor > Edit-Time Checks.
The highlighted blocks and subsystems indicate a compliance issues. Place your cursor over the highlighted block and click the warning icon. A dialog box provides a description of the warning. For detailed documentation on the check that detected the issue, click the question mark. In this case, the warning indicates that the subsystem block name contains incorrect characters.
Open the Bang-Bang Controller chart by double-clicking it. The Model Advisor highlights multiple states. Place your cursor over the warning of the Off state to review the issue.
Select the warning. The Model Advisor indicates that there must be a new line after en: to comply with the MAAB guidelines. In your model, place your cursor after en: and press Enter. A new line is added and the warning is cleared.
You can interactively check that your model complies with DO-178C/DO-331 guidelines by using the Model Advisor.
On the Modeling tab, select Model Advisor.
Select the top-level model
sf_boiler from the System
Hierarchy and click OK.
In the left pane, in the By Product > Simulink Check > Modeling Standards >DO-178C/DO-331 Checks folder, select:
Check safety-related diagnostic settings for solvers
Check safety-related diagnostic settings for sample time
Check safety-related optimization settings for logic signals
Right-click the DO-178C/DO-331 Checks node, and then
Run Selected Checks.
To review the configuration parameters that are not set to the recommended values, click Check safety-related optimization settings for logical signals.
To update the optimization parameters to the recommended values, click the Modify Settings button in the Action section of the right pane. The Model Advisor updates the parameters to the recommended value and details the results.
Repeat steps 1 and 2 for the other two checks: Check safety-related diagnostic settings for solvers and Check safety-related diagnostic settings for sample time.
To verify that your model now passes, rerun the selected checks.
To generate a results report of the Simulink Check checks, select the DO-178C/DO-331 Checks node, and then, in the right pane click Generate Report.