NI Scan Engine Faults (Real-Time, Windows)

Targets with the NI Scan Engine installed use faults to address asynchronous error conditions. LabVIEW defines three fault levels: minor, major, and unrecoverable. LabVIEW logs all faults in memory on the target. Use the Scan Engine Probe view in the NI Distributed System Manager to view and clear NI Scan Engine faults on a target.

Minor faults are equivalent to warnings and do not trigger fault handling behavior. Examples of minor faults include startup errors, which can occur when the controller is unable to apply its saved configuration on startup.

Major faults are equivalent to errors. For example, if LabVIEW detects that the scan engine has run late, LabVIEW triggers major fault −66460. If LabVIEW detects ten consecutive late scan iterations, LabVIEW triggers major fault −66461 and the NI Scan Engine stops running.

Note��Some I/O hardware drivers implement fault handling behavior in response to major faults. Refer to the specific hardware documentation for information about fault handling behavior.

Unrecoverable faults can occur due to a hardware failure or software crash. In the event of an unrecoverable fault, reboot the controller and contact National Instruments.

Viewing and Clearing Faults

Use the NI Distributed System Manager to view and clear faults. You also can use the Get Fault List VI and the Clear Fault VI to view and clear faults programmatically. Clearing a fault removes the fault from memory as if the fault had never occurred.

System Faults

LabVIEW defines a set of common faults. You can log additional faults based on LabVIEW error clusters. LabVIEW groups fault codes by type, as shown in the following table:

Note��Refer to the specific hardware documentation for information about fault handling behavior.
Fault Type Range of Fault Codes
I/O Scan Driver Errors −66000 through −66099
I/O Variables −66200 through −66299
NI Scan Engine VIs −66300 through −66399
NI Scan Engine −66400 through −66499
User Fault Any LabVIEW error code

Triggering Faults

You can use the Set Fault VI to trigger minor or major faults based on LabVIEW error codes. To trigger a custom fault, you can define a custom error code and then pass that code to the Set Fault VI.

LabVIEW reserves a memory pool large enough to log up to 100 unique fault codes. If you exceed 100 unique fault codes, LabVIEW triggers minor fault −66420 and stops logging additional faults. However, even if the maximum number of user faults has been reached, a major or unrecoverable fault still can trigger hardware drivers to initiate fault handling behavior.

Configuring Faults

You can customize the level and triggering behavior of specific faults with custom fault configurations. You can apply custom fault configurations either interactively or programmatically.

Use the Fault Configuration section of the Scan Engine page to apply custom fault configurations interactively. Use the Fault Configuration VIs to apply custom fault configurations programmatically.

Some faults cannot be configured. However, the list of configurable faults depends on which NI Scan Engine I/O software is installed. Use the Configurable Faults list in the Fault Configuration section of the Scan Engine page to view the list of configurable faults interactively.