Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Diagnostics

View diagnostics for models, Configure and customize diagnostic checks, Understand diagnostic viewer layout

Simulink® provides diagnostic messages when certain conditions are detected during a Simulink operation on a model. The diagnostic messages are captured under error, information, or warning categories.

The diagnostic messages encountered during a command-line operation are displayed on the command prompt while that encountered during a Simulink user interface operation are displayed in the Diagnostic Viewer user interface. For example, if you use the command Simulation > Run to simulate a model, the diagnostic messages are displayed in the Diagnostic Viewer but if you use the command sim(bdroot) in MATLAB® command prompt to simulate a model, the diagnostics messages are displayed in the command prompt.

You can customize the diagnostic messages, and also customize the conditions the software checks to either produce errors or warnings.

The diagnostics for model are displayed in the Diagnostic Viewer user interface. To know more about the diagnostic viewer, see the topic View Diagnostics.

You can also add Model Verification blocks to your model, to check the condition of specific signals. To know more about Model Verification, see topics listed under Run Model Checks.

Functions

sldiagnostics Display diagnostic information about Simulink system
Simulink.restoreDiagnostic Restore diagnostic warnings to a specific block, subsystem, or model
Simulink.suppressDiagnostic Suppress a diagnostic warning from a specific block
Simulink.getSuppressedDiagnostics Return Simulink.SuppressedDiagnostic objects associated with a block, subsystem, or model
Simulink.BlockDiagram.getChecksum Return checksum of model
Simulink.SubSystem.getChecksum Return checksum of nonvirtual subsystem
Simulink.getSuppressedDiagnostics Return Simulink.SuppressedDiagnostic objects associated with a block, subsystem, or model
Simulink.suppressDiagnostic Suppress a diagnostic warning from a specific block
Simulink.restoreDiagnostic Restore diagnostic warnings to a specific block, subsystem, or model
modeladvisor Open Model Advisor
sldebug Start simulation in debug mode
addterms Add terminators to unconnected ports in model

Classes

Simulink.SuppressedDiagnostic Suppress diagnostic warnings from a specified block

Topics

Diagnostic Viewer

View Diagnostics

Introduction to Diagnostic Viewer user interface

Systematic Diagnosis of Errors and Warnings

Identify and locate errors and warnings systematically

Report Diagnostic Messages Programmatically

Use sldiagviewer functions to generate, display, and log diagnostic messages

Suppress Diagnostic Messages Programmatically

Suppress and restore diagnostic messages programmatically.

Customize Diagnostic Messages

Customize error messages to display text and hyperlink

Related Information

Was this topic helpful?