LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xxx-errors.txt example

Hi:
I'm developing an instrument driver for an instrument with a long list of custom error codes. Can anyone point me to an example of an xxx-errors.txt XML error code file that I could use as a guide for creating my own?
Thanks
-Suz.
0 Kudos
Message 1 of 7
(3,721 Views)
Suz;

The attached file may help you as an example of an error code file in XML. I modified it from a program somebody provided to me; however, I don't have experience with XML based error code files.

I wrote a small VI that allows you to create a Custom Error Handler VI. It is not based on XML, but may do the work. You can download it from here:

http://www.jyestudio.com/lview.shtml

It is called Custom Error Handler Creator. I hope this help.

Regards;
Enrique
www.vartortech.com
Message 2 of 7
(3,721 Views)
ups... now with the attachement.
www.vartortech.com
0 Kudos
Message 3 of 7
(3,721 Views)
Aha! Thanks. Just what I was looking for.
0 Kudos
Message 4 of 7
(3,721 Views)
There is an alternative to creating an error code file that I would recommend for instrument specific error codes in an instrument driver. Basically, when creating content for an error cluster pre-pend to the beginning of source text. This tag tells LabVIEW to use the information in the source text as the explanation for the associated error code. LabVIEW ignores any previously defined explanations in the LabVIEW error codes database.

I am attaching bitmaps of sample code using the ERR tag as well as the resulting Explain Error window.
Message 5 of 7
(3,721 Views)
Wow that looks sweet. Thanks!
With this approach, the LV driver error XML file doesn't have to be MAINTAINED through evolutions of the device. Nice.
But to be well-informed: are there any situs where one would NOT want to use this approach?

S.
0 Kudos
Message 6 of 7
(3,721 Views)
If you have several instances of the same error code and description to be returned throughtout the API, I would recommend using the XML file as the error is documented once and maintained in a single place (e.g., timeout error). However, if the error code and explanation differ throughout the API (i.e., typically one instance per error), then using the approach is a good alternative. I guess if you want to maintain a single document with all your errors, you might want to use the XML approach. Again, the downside to the XML approach is one extra file to worry about for deployment.
0 Kudos
Message 7 of 7
(3,721 Views)