LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I know which error codes a particular VI can give?

Solved!
Go to solution

Hi,

 

I have been trying to write a good error handler (i.e. not one that just sends all errors through the application) but I have not been able to find information regarding what error codes specific VI's can throw. I've searched the forum, and googled but haven't found anything about this.

 

What I want is something similar to the .NET documentation regarding exceptions.

For example, by looking in the documentation for StreamReader.Read.ReadAsync() I immedeately knows which exceptions the method throws and then I can handle them directly when I get the error. In LabVIEW I do it with trial and error; see what errors I get during testing, and then take care of them. Surely there must be a better way of dealing with this problem?

 

I know there are pages in the help for error ranges and such, but I want to know what errors specific VI's throw. Does such documentation exist for the LabVIEW VI's?

 

 

Best regards

Anders

0 Kudos
Message 1 of 4
(2,923 Views)
Solution
Accepted by topic author cyphish
0 Kudos
Message 2 of 4
(2,911 Views)

Thank you for the quick answer (and sorry for missing that post when I searched through the forums).

0 Kudos
Message 3 of 4
(2,907 Views)

nathand response is correct that you will never be able to figure out alll of the Errors a VI can generate without digging deep into the VI. but you can always check for the categoric Errors a Labview function can output. I'm assuming you are talking about the Labview provided functions and VIs here.

In labview 2012 and later you can see the error related to each category by placing a Error Ring, found in the Programming>Dialog and User interface Pallet. Drop down the ring to open a window which will show you all the different categories.

For example if you are using a IMAQdx function, you can find all of the errors that relate to IMAQdx. Obviously you could always have a error caused by IMAQdx not being licensed, and this wouldn't fall under the IMAQdx error category.But generally if you are setting up error handling in you Program you only worry about recovery from errors that are caused during use, for example a camera being disconnected. which this way you can located very simply.

 

Hope this helped,

0 Kudos
Message 4 of 4
(2,890 Views)