LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

General QUestion about error handling

Hello,
 
   I am writing my own VI's to communicate with my hardware. Each one of the VI's incorporate numerous error checking routines to detect if the desired operation completed correctly. If error(s) are detected with a VI, the "Bundle by Name" VI is used to update the Natiinal Instruments error cluster with the appropriate info each time a error occurs.
  What I am finding is that the VI error cluster contains the last error found, instead of the first error found. Please be aware that I am assuming (we know what that stands for) is that the National Instruments error cluster is accumulative, so if I add four errors to the cluster, then the error cluster contains at least four errors.
  So how do I find the first error that was entered into the error cluster. I have found a vi called "Find First Error:, but I am confused (as usual) on how to get what I want. So I am asking for "divine guidance" or a kick in behind from the Labview wizards on how to correctly handle errors.
 
 Regards,
 
Kaspar
Regards,


Kaspar
0 Kudos
Message 1 of 4
(3,004 Views)

The cluster is a standard cluster and is not accumulative.

Usually, the way to handle this is to check the error in terminal and if it is has an error to pass the error instead of executing the code. That way, when you have an error, the rest of the code does not execute. Here's an example:

If you want to merge the error numbers, search the forums for Mike Porter's error stacker.


___________________
Try to take over the world!
Message 2 of 4
(2,991 Views)
The standard LabView error cluster only contains one error. So, your assumption is wrong. What do you want to do?
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 3 of 4
(2,990 Views)

Hello,

   Thank you for the "divine guidance". I will change by VI's that make sure that code execution will stop when the first error is found, therefore when the vi exits, it will contain the first error.  Thanks for getting back to me.

Regards,

Kaspar

P.S. Please be aware that I usually rate responses from the "wizards: as "very best"!

 

 

 

Regards,


Kaspar
0 Kudos
Message 4 of 4
(2,981 Views)