I had an issue today on an older project today using the Variant to Data function. I was getting a runtime error at the Variant to Data conversion. Unfortunately, there were many instances of this function in my project. Although I’d narrowed it down to one VI and was logging the error, it still did not tell me which instance was generating the error.

Conditional Error Probes in LabVIEW

A nice feature in LabVIEW is the Conditional Error Probe. This is a bit more advanced than your standard probe, and it has the ability to stop your code and notify you when and exactly where an error has occurred.

You get this feature by right clicking on a wire as you would drop a probe. Select Custom Probe -> Conditional Error Probe:

Conditional Error Probe


This opens up a window where you can define the condition of the probe. This controls when LabVIEW will halt execution at the probe location

Probe Watch Window


When your code runs and you get an error at this probe location, LabVIEW halts execution and displays the block diagram where the error occurred. In the image below, this helped me quickly identify that I had an error when converting Variant to Data in the “Step Message” case.

Code halted at Probe


I just re-discovered this feature today, how do you use this function? Do you have any other essential debugging tools in LabVIEW?