This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Check for Standards Compliance in Your Model

WithSimulink® 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.

Detect and Fix Model Advisor Check Violations by Using Edit-Time Checking

In the Model Advisor, you can check that your model complies with certain guidelines while you edit.

  1. Create a copy of the example project in a working folder. At the command line, enter:


  2. Open the model. At the command line, enter:

    open_system simulinkCruiseErrorAndStandardsExample

  3. In the model window, turn on edit-time checking by selecting Analysis > Model Advisor > Display Advisor Checks in Editor. Alternatively, on the model editor toolbar, select Display Advisor Checks in Editor from the Model Advisor menu.

  4. The highlighted subsystem block indicates a compliance issue. 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.

  5. The subsystem block name, Compute target speed, contains incorrect spaces. To fix this violation, select Compute target speed and replace the name with ComputeTargetSpeed.

    After renaming the block, you do not see a warning icon when you place your cursor over the subsystem block.

Detect Model Advisor Check Violations Interactively

You can interactively check that your model complies with DO-178C/DO-331 guidelines by using the Model Advisor.

  1. In the model window, select Analysis > Model Advisor > Model Advisor.

  2. To choose simulinkCruiseErrorAndStandardsExample from the System Hierarchy, click OK.

  3. In the left pane, in the By Product > Simulink Check > Modeling Standards > DO-178C/DO-331 Checks folder, select:

    • Check safety-related optimization settings

    • Check safety-related diagnostic settings for solvers

    • Check safety-related diagnostic settings for sample time

  4. Right-click the DO-178C/DO-331 Checks node, and then select Run Selected Checks.

Update Model to Reach Compliance

  1. To review the configuration parameters that are not set to the recommended values, click Check safety-related optimization settings.

  2. 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.

  3. 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.

  4. To verify that your model now passes, rerun the selected checks.

Display an HTML Report of Check Results

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.

Related Topics