LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

User defined Error Codes

Hello,
 
  I am using the "Bundle by Name" VI to insert error info into the Labview Error Cluster.   I am doing calculations and have assigned a -23096 to the error code and during program execution a dialog box pops up stating the following
 
Possible reason(s):
Analysis:  Too many decimal points.
 
 
I am assuming the dialog box is being generated by the system because the -23096 is defined to in the the range for Math errors. So how do I defined my own error codes that Labview will not use and cause unexpected dialog boxes to appear. My approach to handing the errors is the I will check the error status flag and if the error is one of mine I will handle it.
 
Regards,
 
Kaspar
Regards,


Kaspar
0 Kudos
Message 1 of 5
(4,544 Views)
 

Here is a link to LabView that discusses  what codes you can use.

https://www.ni.com/docs/en-US/bundle/labview/page/defining-custom-error-codes.html

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 2 of 5
(4,539 Views)

Hello,

  I went to the website above and found 2 "user defined" error codes, I have elected to use error code 5000. So, when I insert the error with "Bundle By Name" I get a dialog box that comes up. So will I always get a dialog box that comes up when I insert a error? Is there such a thing as a error without the dialog box?

 

Regards,

 

Kaspar

 

Regards,


Kaspar
0 Kudos
Message 3 of 5
(4,526 Views)

Kasper,

 What version of LV are you using? If you have 8.2.1 you can also create custom error codes in text files. Tools>>Advanced>> Edit error codes. You can use any code between 5000 and 9999 as well as between  -8999 and -8000 inclusive. If you would post a pic of the block diagram or a small snippet of code we could probably help you better.

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 4 of 5
(4,520 Views)

After rereading your last post I think I know what you are getting at. Here is how I create a custom error cluster.

1.On your front panel lay down a "error in" control cluster found in 8.2.1 at Array Matrix and Cluster.

2.Switch to your block diagram and right click this control and change it to a constant.

3.Wire this constant into the top of a bundle by name function. Expand the bundle by name to show the 3 elements. For each element create a constant and enter your information. You can feed the output of this function to any error input of the following vi's or create an indicator and hook it to your front panel connector pane.

Hope this helpsSmiley Happy

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 5 of 5
(4,511 Views)