 abeaver
		
			abeaver
		
		
		
		
		
		
		
		
	
			
			
    
	
		
		
		03-18-2015
	
		
		09:06 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		08-05-2025
	
		
		12:47 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		 Content Cleaner
		
			Content Cleaner
		
		
		
		
		
		
		
		
	
			
		
Hi,
I am writing an instrument driver and am following the steps onlined here. I am confused about error handling within a distributable instrument driver. Drivers I have downloaded in the past have errors in these ranges
| -1073999873 to -1074001919 | BFFC0801 to BFFC0FFF | ERROR: Developer defined errors | 
How do I define error codes in this range for an instrument driver so the "General Error Handler.vi" can recognize the error and display the approriate message?
For example, if you open the "General Error Handler.vi" and input any error code defined here and enable error status into the error in cluster then run the VI it will automatically display the proper error message defined in the previous link. Is this how a instrument driver should operate as well?
Thanks!
 mikeporter
		
			mikeporter
		
		
		 
		
		
		
		
		
	
			03-18-2015 11:56 PM
03-19-2015 12:01 AM
Thanks for the feedback, Mike. But if you release an instrument driver with user defined codes they would interfere with the instrument driver's user software if they also defined codes within that range. Am I missing something here?
 mikeporter
		
			mikeporter
		
		
		 
		
		
		
		
		
	
			03-19-2015 12:25 AM
 IronBrotha
		
			IronBrotha
		
		
		
		
		
		
		
		
	
			
			
    
	
		
		
		03-19-2015
	
		
		11:44 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		08-05-2025
	
		
		12:49 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		 Content Cleaner
		
			Content Cleaner
		
		
		
		
		
		
		
		
	
			
		
I will say yes, yes they will interfere, So when you run you app 1 of 3 things can happen. either will 1) display a random error code not the one you defined. or 2) won't display anything and 3) and this is the option we all can agree to hate, which is a broken VI.
Iwould have to agree with Mr. MikePorter
"The basic problem is that there are only so many error codes possible and Microsoft and NI were in line ahead of you."
You can double check this:
"But maybe you don't need your own codes, does an existing code express what you need to say? "
Mayb e some codes that are already in LabView will can work for your application.?
I you want further information on this topic, please refer to the following documentation.
https://forums.ni.com/t5/Developer-Center-Resources/Error-Codes/ta-p/3529727
I hope this reply finds you well.
Please let us know if you need further information.
Warm Regards,
Sigi D.
Application Engineer.
 billko
		
			billko
		
		
		
		
		
		
		
		
	
			03-19-2015 02:19 PM
@abeaver wrote:
Thanks for the feedback, Mike. But if you release an instrument driver with user defined codes they would interfere with the instrument driver's user software if they also defined codes within that range. Am I missing something here?
At least NI will report all defined errors for the error number so you can narrow it down. I guess the real problem is more subtle than just "what happens if the error number is thrown?" I guess it would be more like, "What if the software is set up to swallow that error number?" That would be the real concern.
03-19-2015 02:43 PM - edited 03-19-2015 02:44 PM
Thanks for all the replies! Now I understand the situation. Here is my workaround solution 🙂
 IronBrotha
		
			IronBrotha
		
		
		
		
		
		
		
		
	
			03-19-2015 02:53 PM
Awesome!!!!!
keep us posted if anything else comes up!
(hopefully it won't happen anything unexpected because you are an awesome programmer ) 
Have a good day man!
Sigi D.
Application Engineer
National Instruments