Rick,
You can find information on how to create your own error codes in the LabVIEW Help File by going to: Help >> Contents and Index >> Contents Tab: Debugging VIs >> Error Checking and Error Handling which contains several documents for this purpose.
Also let me attach a brief description for the User Error Codes that a partner here in NI give to a previous customer:
The General Error Handler.vi has many optional inputs. The two we are interested in today are the two along the top of the VI. "User defined descriptions" is an array of strings. "User defined codes" is an array of int32 values. The first array should list all the text descriptions for the new errors you'd like to add. The second array is the error codes for your new errors. An example
: Let's say your new error is going to be number 5001 and your text is going to be "Zero is not a valid input to this function." The first element in the string array would be your text, and the first element in your numeric array would be 5001. It is suggested that users use error code values between 5000 and 9999 to leave room for additional error codes that might come out in future Labview releases.
Now, some of you may be saying, "That works for a single case. But what if I use the General Error Handler in lots of places. Do I have to copy my input array all over every time I want to have my personal errors included?" No. Simply create a wrapper VI, such as the one provided here, that includes your personal errors as inputs. Then use that VI any place that you would use the General Error Handler or the Simple Error Handler. In this way, if LabVIEW later updates the functionality of the General Error Handler, your VI gets the benefits of that change without losing your own chang
es.
I hope this information may be of help, good luck!
Nestor Sanchez
Applications Engineer
National Instruments
Nestor