LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Email with Labview

Ekran Alıntısı.JPGHow can ı send e-mail like this at hourly not every 60 minutes for example 1:00,2:00 or 16:00

0 Kudos
Message 1 of 9
(3,220 Views)

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.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 9
(3,203 Views)

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. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 9
(3,196 Views)

I understand what do you mean but ı couldnt do that at labview.When you are avaible,could you please send me picture of VI.

0 Kudos
Message 4 of 9
(3,172 Views)

talhaecee, can you post what you've done? Please post the actual VI, not a picture.

0 Kudos
Message 5 of 9
(3,166 Views)

Im sorry I didnt know that it was a rule.Not again

0 Kudos
Message 6 of 9
(3,157 Views)

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. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 9
(3,154 Views)

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.

 

Bob Schor

0 Kudos
Message 8 of 9
(3,125 Views)

You could check what hour it is and send the email whenever the hour changes from last time you checked.

check hour changes snippet.png

0 Kudos
Message 9 of 9
(3,116 Views)