Main Content

Simulink.fault.updateReferences

Synchronize model fault information files

Since R2023b

Description

Simulink.fault.updateReferences(model) synchronizes the fault information files used by the model, model. Synchronizing fault information files copies the faults and their properties from referenced models into the specified model. When you modify the faults in the top model, the changes do not affect the faults created in the referenced model.

example

Examples

collapse all

Open a model with a block that supports fault modeling.

openExample('simscape_shared/SimpleMotorArmatureWindingFaultExample')

Create a new model and save it as topModel.

Add a Model block and set the Model name parameter to SimpleMotorArmatureWindingFault.

Add a fault to the DC Motorblock in the SimpleMotorArmatureWindingFault model.

Simulink.fault.addFault(...
"SimpleMotorArmatureWindingFault/DC Motor/Armature winding");

Save and close the SimpleMotorArmatureWindingFault model, and reopen the topModel model.

save_system("SimpleMotorArmatureWindingFault");
close_system("SimpleMotorArmatureWindingFault");
open_system("topModel");

Synchronize the fault information.

Simulink.fault.updateReferences("topModel");

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

Version History

Introduced in R2023b