LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Link Custom Error Codes from external file to application

I have an application that returns custom error codes without explanation, however I do have a list in Excel that matches the codes with their definition. My question is that how can I match the code given by the application with the explanation from the file and display both the code and definition in LabVIEW? 

Thanks for your answers in advance!

0 Kudos
Message 1 of 4
(2,878 Views)
0 Kudos
Message 2 of 4
(2,875 Views)

Thank you, but most likely this application will be used on different computers, so I am looking for a solution that could be implemented directly into my project, so the user from another pc would only need to copy all the VIs and the error codes file and not worry about anything else.

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

-Yes, you can create a .txt file defining all the custom error codes and distribute along with the application.

- Complete the following steps to define custom error codes using the Error Code Editor.

  1. Select Tools»Advanced»Edit Error Codes to launch the Error Code Editor.
  2. In the prompt that appears, click the New button to create a new error codes file or click the Existing button to browse to an existing error codes file.
  3. Enter comments about the error codes file in the Comments about this file text box.
  4. Click the error code to edit the code and select the space under the Text column to add text for the error. Click the Add Error Code button to add another error code to the error codes file.
  5. To edit the error codes and descriptions, select the error code or text you want to change, and enter your edits. Select the Sort Error Codes button to sort the error codes in ascending order. If you want to delete an error code, select the error code and click the Delete Selected Error Code button.
  6. When you are done editing the error codes file, click the Save button to save the error codes file in the labview\user.lib\errors directory. You must save the error codes file in the format xxx-errors.txt, where xxx is a name that you supply.

-Ref:http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/def_custom_error_text/

Thanks
uday
0 Kudos
Message 4 of 4
(2,843 Views)