12-09-2019 11:38 AM
How can ı send e-mail like this at hourly not every 60 minutes for example 1:00,2:00 or 16:00
12-09-2019 12:14 PM - edited 12-09-2019 12:17 PM
Use the timestamp function to get a Date Record. Create a flag value (boolean in shift register) for storing if email has been sent for this hour. Check the value of the flag and the minutes value in the date record. If minutes are 0 and flag cleared, send email and set the flag. When minutes are any other value, clear the flag.
12-09-2019 12:26 PM
Be sure to include a wait function with a small value (100ms, for example) to prevent a greedy loop from taking control of your CPU.
12-09-2019 01:14 PM
I understand what do you mean but ı couldnt do that at labview.When you are avaible,could you please send me picture of VI.
12-09-2019 01:25 PM
talhaecee, can you post what you've done? Please post the actual VI, not a picture.
12-09-2019 01:39 PM
Im sorry I didnt know that it was a rule.Not again
12-09-2019 01:45 PM
You misunderstand what gregory said. He's asking you to post your code where you tried to implement my suggestion. Don't post a picture of your code because it is hard for us to debug and tell where you went wrong. This isn't a "rule", it is a courtesy and matter of convenience for the person who is trying to help you.
12-09-2019 03:28 PM
Is it fair to assume that once you get the mail sent "on the hour" once, you'll simply have a "Wait 60 minutes = 3600 seconds = 3600000 ms" loop to do the succeeding e-mail? If so, then all you have to do is figure the first "wait" until the next hour, and then all the rest of the "Wait"s are 60 minutes.
But this is a simple calculation, as the LabVIEW Timestamp is a representation of "seconds since 1 Jan 1904 UTC", which you can convert to a Dbl and you'll have seconds. Round this value and take the remainder mod 3600 (seconds/hour), and you have "seconds to wait until the first e-mail is sent", with the reset being sent every 3600 seconds thereafter.
12-09-2019 03:47 PM
You could check what hour it is and send the email whenever the hour changes from last time you checked.