BobHamburger Posted September 10, 2008 Report Share Posted September 10, 2008 Here's the latest insight and ramblings on My Blog Quote Link to comment
crelf Posted September 10, 2008 Report Share Posted September 10, 2008 QUOTE (BobHamburger @ Sep 9 2008, 12:23 AM) Here's the latest insight and ramblings on My Blog Wrapping subVI code in error cases is an important step toward ensuring smooth integration, along with IEEE Std 830-1993 compliant requirements, detailed up-front design and unit testing (FMEA-driven or otherwise). Quote Link to comment
LAVA 1.0 Content Posted September 10, 2008 Report Share Posted September 10, 2008 QUOTE (BobHamburger @ Sep 9 2008, 12:23 AM) Here's the latest insight and ramblings on http://labviewinsights.blogspot.com/2008/09/put-error-handling-in-every-subvi.html' rel='nofollow' target="_blank">My Blog Agreed! We go a step further and use functions that check the error boolean and log the error to file when detected. The log file is the first place I check if things go badly AND It's the first place I check if the app runs fine. It also lets me "see" the error after the fact, like when the customer from two years ago sudenly runs into a problem. I can't count the number of times engineers have returned from delivering an app saying "I love that Event Logger!" Ben Quote Link to comment
Antoine Chalons Posted September 10, 2008 Report Share Posted September 10, 2008 QUOTE (neB @ Sep 9 2008, 12:50 PM) It also lets me "see" the error after the fact, like when the customer from two years ago sudenly runs into a problem.I can't count the number of times engineers have returned from delivering an app saying "I love that Event Logger!" Ben I totally agree with that, you can't seriously ship a system to a customer without some kind of event logger. The time spent on this is saved hundreds of times when you have many system out in the industry ! Quote Link to comment
jdunham Posted September 10, 2008 Report Share Posted September 10, 2008 Error handling is great, and we use it just about everywhere, especially if there is any I/O or any chance for invalid arithmetic results. But if the routine does not have any need for error handling, then I think it is counterproductive to add it. If you were writing "Trim Whitespace.vi" for your own library, would you add error handling? Some of our code just converts between data structures, and those absolutely need to be in subvis so that the conversion is encapsulated. However there is usually no need for error handling. If there is bad data in the cluster, there will usually be an error thrown somewhere nearby, and it doesn't matter whether the conversion itself operates on an empty cluster. Quote Link to comment
eaolson Posted September 10, 2008 Report Share Posted September 10, 2008 QUOTE (jdunham @ Sep 9 2008, 12:58 PM) Error handling is great, and we use it just about everywhere, especially if there is any I/O or any chance for invalid arithmetic results. But if the routine does not have any need for error handling, then I think it is counterproductive to add it. I have to agree. Adding error handling to every VI whether it needs it or not is unnecessary and overly-complicated. Adding unnecessary error handling inputs/outputs is syntactically equivalent to just putting everything inside a sequence structure. It's just that it looks tidier because the icon is smaller than the structure. Quote Link to comment
crelf Posted September 10, 2008 Report Share Posted September 10, 2008 QUOTE (jdunham @ Sep 9 2008, 01:58 PM) If you were writing "Trim Whitespace.vi" for your own library, would you add error handling? As usual, my answer is "it depends" Error cases are important when used appropriately, and I agree that that wrapping all VIs in error cases can be overkill. Quote Link to comment
PaulG. Posted September 10, 2008 Report Share Posted September 10, 2008 Error handling is a lifesaver - especially when used to monitor the status of any hardware. I can't tell you how many times I've gotten into "it's a hardware issue" "no, it's a software issue" discussions. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.