Main Content

Copying Faults

Since R2025a

You can copy faults that you define in a model or library. You copy faults by copying the blocks that contain faults. To copy a fault:

  1. Cut or copy the block.

    • Cut the block — Right-click the block, click the arrow , and then click the Cut button , or click the block and press Ctrl+X.

    • Copy the block — Right-click the model element, click the arrow , and click the Copy button or click the block and press Ctrl+C.

  2. Paste the block. Right-click the Simulink® model canvas, click the arrow , and click the Paste button or click the model canvas and press Ctrl+V.

Pasting the block duplicates the block, the faults assigned to the block ports, and the fault behavior.

You can copy the fault into the same or a different model. Depending on whether you paste the fault in the same or a different model, Simscape™ saves the fault in one of these ways:

  • Copying faults into the same model — Simscape also adds the fault behavior to the fault model assigned to the original fault.

  • Copying faults into a different same model — If the faults in each model use only one fault model, or if one of the models does not have faults, Simscape copies the fault behavior in the existing fault model. If the faults in each model use more than one fault model, Simscape asks you to select the fault model before copying the fault.

Copy Faults into Referenced Models

You can copy faults into referenced models. When you copy a block into an instance of a referenced model:

  • The original referenced model updates to include the copied block and faults.

  • Simscape duplicates the copied block across other instances of the referenced model, but does not copy the faults. To copy the faults to the other instances of the referenced model, resynchronize the fault information files. In the Simscape Block tab, in the Faults section, click Resync Faults.

To add a fault to a single instance of a referenced model, access it from the top model, then define the faults.

Copy Faults from Model Libraries

You can add faults to libraries, and copy the library blocks into your models. Like standard Simscape models, libraries use a unique fault information file. To add a library block that has faults to a model, copy and paste the block or drag it into the model. The Fault Table pane in your model includes the copied faults.

If you add faults to a library after adding the linked library block to the model, you can synchronize faults from library blocks into the parent model (since R2026a).

See Also

Topics