Main Content

getFaultModel

Get name of fault model

Since R2023b

Description

name = getFaultModel(fault) returns the name of the fault model that contains the behavior assigned to 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');

Add an empty behavior to the fault.

addBehavior(myFault,"myBehaviorModel");

Retrieve the name of the fault model associated with myFault.

myBehaviorModel = getFaultModel(myFault)
myBehaviorModel =

    'myBehaviorModel'

Input Arguments

collapse all

Fault, specified as a Fault object.

Output Arguments

collapse all

Name of the fault model that contains the fault behavior, returned as a character vector.

Version History

Introduced in R2023b

See Also

Objects

Functions