Main Content

Simulink.fault.report

Generate fault specification reports

Since R2023b

Description

status = Simulink.fault.report(model) generates a fault specification report for the specified model. The report summarizes properties of the model, faults, conditionals, and their traceability information.

example

status = Simulink.fault.report(model,Name=Value) generates a fault specification report by using one or more name-value arguments.

example

Examples

collapse all

Open the sldemo_fuelsys_fault_analyzer model in the Evaluate Fault Combinations on a Fault-Tolerant Fuel System example.

openExample('faultanalyzer/EvaluateFaultsForFuelSystemExample')
model = "sldemo_fuelsys_fault_analyzer";
open_system(model)
fuelSysFaultSetup

Generate a PDF fault specification report.

Simulink.fault.report(model);

Open the sldemo_fuelsys_fault_analyzer model in the Evaluate Fault Combinations on a Fault-Tolerant Fuel System example.

openExample('faultanalyzer/EvaluateFaultsForFuelSystemExample')
model = "sldemo_fuelsys_fault_analyzer";
open_system(model)
fuelSysFaultSetup

Generate an HTMX package fault specification report that excludes fault behavior details.

Simulink.fault.report(model,FileType="htmx",...
IncludeBehaviorDetails=false);

Input Arguments

collapse all

Path or handle to the model, specified as a string scalar, character vector, or model handle.

Data Types: string | char | double

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: Simulink.fault.report("myModel",OpenAfterCreate=true) generates a fault specification report and opens the report afterwards.

Report title, specified as a string scalar or character vector. If you do not specify this name-value argument, the default title is Fault Specification Report for MODELNAME, where MODELNAME is the name of the model

Data Types: string | char

Report author, specified as a string scalar or character vector. If you do not specify this property, the default value is the username of the system running MATLAB®. To find this name, enter getenv("user") into the MATLAB Command Window.

Data Types: string | char

Exported report file type, specified as one of these options:

ValueDescription
"pdf"Exports the report as a PDF file.
"docx"Exports the report as a Microsoft® Word document with the .docx extension.
"htmx"Exports the report as an HTMX zipped package.

Data Types: enum

Report file name, specified as a string scalar or character vector. Do not include the file extension.

Data Types: string | char

Whether the report includes fault details, specified as a numeric or logical 1 (true) or 0 (false). For more information on faults, see Define and Model Faults.

Data Types: logical

Whether the report includes fault behavior details, specified as a numeric or logical 1 (true) or 0 (false). For more information on fault behaviors, see Define and Model Faults and Create Predefined and Custom Fault Behaviors.

Data Types: logical

Whether the report includes conditional details, specified as a numeric or logical 1 (true) or 0 (false). For more information on conditionals, see Create and Manage Conditionals.

Data Types: logical

Whether the report includes link details attached to faults and conditionals, specified as a numeric or logical 1 (true) or 0 (false). Clicking on the linked artifact in the report opens the corresponding artifact in Simulink®. For more information on linking artifacts in Simulink Fault Analyzer™, see Link Artifacts.

Data Types: logical

Whether the report includes the content of the Fault Table pane, specified as a numeric or logical 1 (true) or 0 (false). For more information on the Fault Table pane, see Enable, Modify, and Select Active Faults and Create Conditionals.

Data Types: logical

Whether the report opens after creation, specified as a numeric or logical 1 (true) or 0 (false).

Data Types: logical

Output Arguments

collapse all

Whether the report is created, returned as 1 (true) or 0 (false).

Tips

  • If you have MATLAB Report Generator™ or Simulink Report Generator, you can open the report by using the rptview (MATLAB Report Generator) function.

Version History

Introduced in R2023b