LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

smtp send message only between certain hours

I have a vi to let me know when something at works has an issue.  I use the smtp send message to send an email/SMS message to my cell phone.  But when I'm off work, if we have an error, i still get the message.  I would just like to have my smtp message in a case structure so that if the time is between 7 am and 5 pm, then we will send a message, other wise, it will skip it.  Any help would be greatly appreciated. 
 
All i need really is to be able to determine if I am between 7 am and 5 pm or not.
0 Kudos
Message 1 of 3
(2,499 Views)
The code shown in the image below should do the trick.



The "Seconds To Date/Time" function outputs a cluster of time data. The "hour" element is formatted in 24 hour time, if it's between 7 and 17, your message send code will run.

The other case is empty and just set to default.

Ed

Message Edited by Ed Dickens on 04-26-2006 12:22 PM



Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 3
(2,491 Views)
Problem Solved... Thanks a lot.
0 Kudos
Message 3 of 3
(2,486 Views)