LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom error codes conflict with ADCS

Hello,

 

in my application I want to create custom error codes. LabVIEW help says:

"...range of -8999 to -8000, 5000 to 9999, or 500,000 to 599,999..."

 

I wanted to use the range of -8100...-8000, but I recognized that the Automotive Diagnostic Command Set also uses this range.

Which range should I use? How can I know, whether another add-on overrides my custom error code range?

 

Madottati

0 Kudos
Message 1 of 3
(2,308 Views)

Depending on how you generate the custom errors it may not matter that other addons use the same range.  

 

Do create your custom errors with the Tools>>Advanced>>Create or edit custom error files and follow the help file instructions.

 

This creates a new XLM document that can deploy with your package named <MyErrors>-errors.txt  in User.lib  The niFamilyName will display along with the error message.  If the same error code is found in more than one location all family names and descriptions display.

 

I have used a Errors-tracker.txt file (in SCC) as a readme for reserved code ranges.

 

On the other hand, if you really want a unique code for your library of code you need to parse through the existing *-errors.txt files yourself.  (Since LabVIEW manages to do this during every start-up, a judicious search though vi.lib should find you a nifty utility)


"Should be" isn't "Is" -Jay
Message 2 of 3
(2,275 Views)

You can use also Error Ring, and define your error messages/codes there; then for sure you will not have conflicts with other error codes. Like, you will have logical conflicts, but LabVIEW will not care about it.

But the "issue" with Error Rings is, that you need to manage somehow them, and keep track of what error codes are implemented (b/c it's not typedef). You can use some FGV for it, or simple VI with error type selector...

But without any doubts, usage of error codes file (as was described by Jeff·Þ·Bohrer) is more proper approach.

0 Kudos
Message 3 of 3
(2,266 Views)