Veristand Doesnt Stop on Custom Device Runtime Error

Updated Jul 3, 2025

Issue Details

I have an asynchronous custom device for VeriStand. If an error occurs in the Data Loop, the loop just stops, but no error is reported to VeriStand to show a message and/or undeploy the system definition.
Is it possible to display the error to the user and automatically undeploy the current system definition?

Solution

To report errors to VeriStand that happen during the runtime of the custom device, use the NI VeriStand - Add Error Code Channel.vi inside of the System Explorer.lvlib:Initialization VI.vi to add an error code output channel to the custom device. Then in the Engine:RT Driver.vi, write the current error code to the RT FIFO at the appropriate index.

  

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a 
snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram



 

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a 
snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.

This reports the error to the VeriStand engine and it will automatically undeploy the current System Definition if an error code is reported.

Additional Information

Reporting errors this way is highly recommended for custom devices. If no reporting happens, the custom device will stop on an error, and only report it (through the Status Notifier) when the VeriStand Engine shuts down.

The Status Notifier and Initialization Status Notifier cannot be reused to report additional errors to the engine, except once after initialization, or once at the end.