Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Structured Error Handler Library

RyanK,

 

How do you deal with repeating errors? Here is an example:

 

-VI is communicating with a Shared Variable,

-Shared Variable is undeployed

-SEH is set to notify and Display a Pop-up to user with Error Message

-Every time the VI executes, an error message pops up (effectively locking up the screen)

 

 

Is this something that should be dealt with at the source (low level), or at the central error collector?


Thanks

 

-JimM

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 51 of 117
(7,159 Views)

Hi Jim,

 

The SEH has some built-in error filtering that will avoid enqueing two of the same error at one time (it will count them instead and return it in the number of occurrences field), but once you dequeue the error, it can be enqueued again.  In the past I've taken an alarm approach to the situation you describe, where I illuminate some element on my UI, and don't turn it off until some other condition occurs (i.e. the user explicitly clears it, I get a good reading, etc).  This would be best handled by the central error handler.

 

Regards,

Ryan King

Systems Engineer

National Instruments

0 Kudos
Message 52 of 117
(7,157 Views)

Would you recommend integrating this with the DSC Alarm Manager functionality (utilizing the "User Defined Alarm" capabilities)? I am already doing this to notify users of Shared Variable alarm conditions (Hi, Lo, HiHI, LoLo, etc..) and to display (once) error messages from my RT Target. Would it be best to have ALL display of error messages go through the DSC Module?

 

Also, I see the "Number of Occurrences" counter you have as part of the SEH. Is there a way to check this without dequeuing the error? That way you could say "Don't Display if "# of Occurrences is >2" or something to that effect.

 

-JimM

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 53 of 117
(7,152 Views)

Hi Jim,

 

Yes, the DSC Alarm Manager is a great way of handling those alarms.  As to whether I would use it for all error messages, it would really depend on the application.  In an ideal world, I'd be inclined to use alarms for common failures, persistent conditions or things that I want to latch, and error messages for less common failures or messages that require more specific information (such as not finding a file, etc).  However, in many systems, particularly those that operate on manufacturing floors and such, pop-up error messages are a distraction and therefore all error displays need to be through alarms.

 

There isn't a built-in way to monitor the number of occurrences, but you could add one to the functional global easily enough.  However, elements are always removed in order of priority (and are FIFO within the same priority), so if you didn't dequeue it, you could potentially back up other errors behind it.  An interesting ability would actually be to add alarm capabilities to the specific error handler (through the DSC module or otherwise) as an alternate option to the priority queue, then you could chose to do one or the other for each error.  However, that would involve editing the configuration, source, and data storage of the Express VI, so unless you're looking to make a project out of it, I think the best approach is just to pop them off the priority queue and then feed them to the DSC alarm manager from your central error handler.

0 Kudos
Message 54 of 117
(7,147 Views)

Ryan,

 

Unable to install SEH in VIPM 2011.  VIPM hangs on "Resolving Package Dependencies".  My guess is that this is caused by the VIPM dependency on GXML which I installed separately outside of VIPM as it was not available for download as a VIPM package.  Is it possible to get GXML as a VIPM package?

 

Thanks

0 Kudos
Message 55 of 117
(7,126 Views)

I installed GXML first, as a regular installer, then VIPM seemed to ignore the missing dependency, and installed SEH anyway. GXML was still listed as a missing dependency.

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 56 of 117
(7,123 Views)

Jim,

 

Thanks for the note.  I tried installing GXML first, even rebooted the computer after installing it.  Unfortunately VIPM still crashes when I try to install SEH.

0 Kudos
Message 57 of 117
(7,121 Views)

Here is a .vip of GXML.  I've installed before without the VIP and it didn't crash, but maybe they've updated VIPM.  If this doesn't fix it you'll probably need to go to JKI for help.

 

Regards,

Ryan 

Message 58 of 117
(7,112 Views)

Ryan,

  Thanks for the GXML VIPM library.  SEH installed with no problems.

0 Kudos
Message 59 of 117
(7,111 Views)

RyanK,

 

I successfully implemented the SEH to DSC Alarm Manager (in the central error collector loop) like you had described, and it works great to keep reoccurring errors from popping up, while still keeping a record of them.

 

I was looking at ways to combine the RT_SEH and the cRIO Fault Engine in a similar manner on my RT targets, except this would be to keep repeated errors from spamming the error log .txt file on the cRIO. Do you have any suggestions on how to integrate the fault engine?

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 60 of 117
(7,069 Views)