Set Fault VI
- Updated2025-03-14
- 2 minute(s) read
Creates a fault. When the major fault input is TRUE, this VI triggers fault mode. Use the code element of the error in (user fault) input cluster to specify the fault code.

Inputs/Outputs
![]() major fault specifies whether the fault is major (TRUE) or minor (FALSE). ![]() error in (user fault) specifies the fault code. If you do not specify a fault code, the fault code defaults to −66480. This VI triggers a fault based on the presence of a non-zero error code, regardless of the value of status. You may optionally provide additional information about the fault in source. ![]() error adding fault contains error information related to the creation of the fault. Fault creation can fail if the NI Scan Engine is not installed on the target or if the target has already reached the maximum number of active faults (100). Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. ![]() error out returns error in (user fault). |
This VI does not allocate memory, so you can use this VI in a time-critical section of an application without significantly affecting determinism.
This VI must run on a target with the NI Scan Engine installed.
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Scan Engine\Scan Engine.lvproj