LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending an alarm via email including delay

Hi everyone,

I have a small problem regrading my alarm function. In the attached picture you can find a simplified version of my VI. I use a Arduino UNO with the LINX packages to read an I2C temperature/humidity sensor. The alarm function should operate under following condition:

1. check every second if humidity value is over 65. True => send one alert email
2. If alert occurs wait 30 minutes and check again if hum is over 65. True=> send another email

3  False => reset the alarm and check again every second if the value is over 65 (back to 1).

If I run the VI like in my picture I will get a lot of emails, basically one every second. I would like to reduce this to one email maximium every 30 min. If after 30 min the condition "over 65" is no valid anymore the code should go back to checking the value every second. The reading of the temp/hum values should not be affect by this and still run every second.

Any ideas on how to implent this? I guess the solution has something to do with shift registers?

Regards

0 Kudos
Message 1 of 4
(2,916 Views)

Hello Franyizu,

 

You could use "Elapse Time" express VI (one of the few usefull) in the Timing pallette.

 

In case your alert emeial is send you reset it and when the elapsed flag is true and the humidity is above the threshold you resend the message.

 

I think with this you will be able to work out the rest, good luck.

 

Regards,

 

André

Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 4
(2,901 Views)

Hi Franyizu,

 

You will need to add some logic to check the time of the last event as well. You can see one way to implement this attached.

 

check_last_event.png

0 Kudos
Message 3 of 4
(2,887 Views)

exactly what I needed! Thanks a lot guys!

0 Kudos
Message 4 of 4
(2,865 Views)