jgarciallamas Posted December 1, 2006 Report Share Posted December 1, 2006 Hi folks, Just a question related to a vi I'm playing these days, hope you will be able to point me in the right direcction. The vi is basically a For Loop which iterates several times, once per I.P connection, because inside the for loop I executed some telnet commands against some machines outside and log the results. The key, and this is my question, is that sometimes and for whatever reason these I.P's are unreacheble so automatically Telnet vi's, from Internet toolkit, are not very happy about this and the error propagates through the different error cluster Telnet vi's and at the end there is a pop up message just with the code of the error and so on, although I get and copy the error through the Simple Error Handle vi, the error message pops up, please see attached file, and I have to press Continue button in order to go on and I'd like to avoid this pop up because the vi would have to run automatically, so in case there were those kind of problems the vi will log the error message and will jump to the next I.P. Any feedback will be welcome. :worship: Kind regards. Jose. Quote Link to comment
syrus Posted December 1, 2006 Report Share Posted December 1, 2006 I have a small utility VI that allows me to trap a particular error and handle it silently. Here's a screenshot and the VI compiled for LabVIEW 8.0: Download File:post-3106-1164988495.vi Quote Link to comment
jgarciallamas Posted December 1, 2006 Author Report Share Posted December 1, 2006 Hi syrus, Thanks a lot for your reply. I'd appreciate you could compile for labview 7.1. Thanks again. Jose. Quote Link to comment
Omar Mussa Posted December 1, 2006 Report Share Posted December 1, 2006 I have a small utility VI that allows me to trap a particular error and handle it silently. Here's a screenshot and the VI compiled for LabVIEW 8.0: Download File:post-3106-1164988495.vi I don't know if clearing the error is the use case described. What you really want to do is log errors to file ... so if you clear the error, you've lost the info you need to log. Instead of using the code as it is presented here (an error filter), I would simply add some logic to write the error code, source and time to a log file (ie build an error log). You may or may not want to log all errors --> so you may or may not need to input the error code. If you want to log all errors, you can place your error log function in the Error case of a case structure. After writing the error to file you can clear the error by using the Clear Errors.vi on the Time & Dialog palette and your loop can keep on truckn'. Quote Link to comment
Aristos Queue Posted December 1, 2006 Report Share Posted December 1, 2006 I don't know if clearing the error is the use case described. What you really want to do is log errors to file ... so if you clear the error, you've lost the info you need to log. Instead of using the code as it is presented here (an error filter), I would simply add some logic to write the error code, source and time to a log file (ie build an error log). You may or may not want to log all errors --> so you may or may not need to input the error code. If you want to log all errors, you can place your error log function in the Error case of a case structure. After writing the error to file you can clear the error by using the Clear Errors.vi on the Time & Dialog palette and your loop can keep on truckn'. Take a look at the General Error Handler.vi. In and among its inputs is the ability to filter the wire value but still output the formatted string of the error so you can dump it to a log file. Quote Link to comment
syrus Posted December 1, 2006 Report Share Posted December 1, 2006 Take a look at the General Error Handler.vi. In and among its inputs is the ability to filter the wire value but still output the formatted string of the error so you can dump it to a log file. Yep. I have to agree that using the built-in exception handling of the General Error Handler.vi is the way to go. My little VI is not needed. Quote Link to comment
jgarciallamas Posted December 4, 2006 Author Report Share Posted December 4, 2006 Hi everybody, first of all, thanks for all of you not only for your valuable answers but also for pointing me out the right direction. By reading your answers I have tried to catch the error I wanted to manage, error code 56 related to networking, just by using General Error Handler.vi, please see attached image file. The question is that it doesn Quote Link to comment
Mellroth Posted December 4, 2006 Report Share Posted December 4, 2006 Any feedback will be welcome.Thanks again. Jose. Remove the string "This is a test". The general error handler requires a match of both code and source, if they are specified. Edit: you should also set the "type of dialog" to "no dialog", if you only want to cancel error 56. Otherwise you will get dialogs for all other errors. /J Quote Link to comment
jgarciallamas Posted December 4, 2006 Author Report Share Posted December 4, 2006 Hi JFM, Yes, you're right. :worship:, thanks for all of you. Thanks a lot. Jose. 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.