Example Code

Error History Probe and XControl

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This code is an XControl which can show current and previous errors and warnings, along with a short history of previously seen errors and warnings.  This XControl is incorporate into probe allowing to probe any error wire and see the history of errors on that wire.  This probe also still has the conditional breakpoints that the included conditional error probe does.

Description

The original XControl was named Super Error-Indicator and was posted by paul_cardinale here.  An Error History tab was added along with other changes needed to facilitate this feature.  Then the Conditional Error probe was used as a template, just adding the new XControl to the UI.

 

Error History.png

Hardware and Software Requirements

LabVIEW 2015 or newer

Steps to Implement or Execute Code

1. Copy the attached code to your <LabVIEW Data>\Probes folder.

2. Right click any error wire and go to Custom Probe >> Error History.vi

3. Optionally add the XControl found in <LabVIEW Data>\Probes\Error History Control\Error History Indicator.xctl to your front panel and wire it to an error.

Additional Information or References

There is plenty of room for improvement.  The Error History tab could color each row to indicate if the error is an error or a warning.  And there is still some oddness with resizing the probe that I can't seem to figure out.  If your probe window is too small I expected scrollbars to appear but instead the UI just gets cut off for some reason.  The error history is limited to 20 errors at the moment, but I could see this being a configuration setting later.  Also one day I could see this being turned into a VIPM package which gets installed into the palette for the XControl, and a probe.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors