05-15-2006 06:29 AM
05-15-2006 06:39 AM
Hi,
You may consider to post your vi or atleast a jpg picture of the block diagram for us to understand your problem better.
However what I can think is that you may be not considering seconds or milli seconds of the hour to send the email. The loop may be fast enough to send the email few times with in even the same second.
You may consider to have a variable where you store the next sending time with date. So update this variable each time you send the email. So even the time looks exactly 11 hr, the date is different for a second loop and so it will only send one mail.
Hope it helps!
05-15-2006 07:32 AM
05-15-2006 08:31 AM
So how many times a second do you think the bottom while loop might be capable of executing? The only thing in the loop that will take a little bit of processing time is the email function and if it executes in less that a second, you will get multiple sends. A quick and easy fix (but not all that elegant, perhaps), is to just put a 1 second delay after the email is sent so that when the loop iteratates again, the times will no long be equal.
p.s. Your code for stopping the while loops will not work. Because the Boolean stop button is outside the while loop, it will not be read after the program starts. In order to be read with each iteration, controls have to be inside a loop.
05-15-2006 09:06 AM