Main Content

getBehavior

Get path of associated Fault Subsystem block

Since R2023b

Description

path = getBehavior(fault) returns the path of the Fault Subsystem block assigned to the fault, 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 path of the Fault Subsystem block associated with myFault.

myBehaviorPath = getBehavior(myFault)
myBehaviorPath =

    'myBehaviorModel/DCMotor_fault'

Input Arguments

collapse all

Fault, specified as a Fault object.

Output Arguments

collapse all

Path of the fault subsystem, returned as a character vector.

Version History

Introduced in R2023b

See Also

Blocks

Objects

Functions