Main Content

Fault Data Inport

Import Simulink model data into fault behavior

Since R2024b

  • Fault Data Inport block icon

Libraries:
Simulink Fault Analyzer / Fault Port Blocks

Description

Fault Data Inport blocks retrieve signal data from a model and feed the data to behaviors that you assign to the faults. You can use these blocks to capture signal data from Simulink® and System Composer™ models.

Use these blocks only in the top-level of a Fault Subsystem block.

For more information, see Access Data from Model Outputs in Fault Behaviors.

Examples

expand all

This example shows how to use model data in a fault behavior by using a Fault Data Inport block. The Fault Data Inport block retrieves data from an output port from a block in the model and sends it to the fault behavior.

Inspect the Model

Open the model. The model contains three signal sources: a Pulse Generator block, a Sine Wave block, and a Constant block. The model has one fault on the output port of the Sine Wave block.

View the Fault Behavior

Open the fault behavior. In the model, click the fault badge, then click the fault behavior preview window. When the fault triggers, the behavior adds the data from the Fault Data Inport block to the signal.

Double-click the Fault Data Inport block to open the Property Inspector. The Property Inspector lists the Fault Data Inport block name and the path of the model element in the Fault Data Inport Blocks section. In this example, the Fault Data Inport block retrieves the data from the output of the Pulse Generator block. The Property Inspector also lists other properties, including the trigger time. The fault triggers when the simulation time is 5.

In the Fault Data Inport Blocks section, click the model element to highlight the data source location in the model.

Simulate the Model

Run the model to view the results. The Scope block indicates that the data from the Pulse Generator block applies to the fault behavior after 5 seconds.

Ports

Output

expand all

The Fault Data Inport block outputs real-valued scalar, vector, or matrix data. Map this block to a block or component output signal in the model. The model must contain the fault assigned to the behavior. The signal that you map to the block determines the output data type.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | string | fixed point | enumeration | bus

Block Characteristics

Data Types

Boolean | bus | double | enumerated | fixed point | half | integer | single | string

Direct Feedthrough

no

Multidimensional Signals

yes

Variable-Size Signals

no

Zero-Crossing Detection

no

Tips

Version History

Introduced in R2024b