12-14-2009 09:38 PM
I am trying to send an email message to myself when an error has occurred while the program is running. The code is pretty complex and I have just taken on this project with limited labview background. I have taken two attempts at putting code in to send an email when an error has occurred. In both cases I get an email to send me the error message but it will not send it until I click the "STOP ME FIRST" button then the "Then Exit Program" button. The error will then pop up and after I click it to exit the error the email sent button lights up and I receive an error email. I am looking to not have to click the two buttons and exit out of the error message in order for me to receive emails when I am not at the program so that I know something has gone wrong. Can anyone help me out with this? I have attached the two attempted codes.
Thanks
12-14-2009 10:43 PM
The code is way too complex. You have case structures and other structures buried 8 layers deep in you upper part of your code. And there is a heavy use of local variables that I suspect is leading to a race condition. Some things like your last e-mail structure will never work like you expect. You read a local variable of e-mail sent and that determines which case of the case structure to execute. The case structure won't execute until the main portion of your code is done due to the data dependency of the error wire. But that local variable is going to be read at the very beginning of your program because nothing else depends on it.
What is the difference between the two VI's you posted?
Why do you preview a queue element before dequeuing it?
I think you need to revisit your whole architecture, the deeply embedded structurs makes it impossible to debug what is going on. That is going to prevent anyone from looking at your code any further. You should probably be looking at a state machine architecture.
12-15-2009 11:02 AM
12-16-2009 05:07 PM