Main Content

activate

Set fault as active fault

Since R2023b

Description

activate(fault) sets the fault, fault, as the active fault and enables the associated model element for fault simulation. If another fault on the same model element is active, the function deactivates the other fault.

example

Examples

collapse all

Open a model with a block that supports fault modeling.

openExample('simscape_shared/SimpleMotorArmatureWindingFaultExample')

Add a fault to the DC Motor block.

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

Assign behavior to the fault and store the behavior in a fault model named myBehaviorModel on the path.

addBehavior(myFault,"myBehaviorModel");

Set myFault as the active fault.

activate(myFault);

Input Arguments

collapse all

Fault, specified as a Fault object.

Version History

Introduced in R2023b

See Also