Sign in to follow this  
Gorkhali

Sending out an email if the pressure is higher than 80 for 10 mins

Recommended Posts

Hi,

 

I have a very similar case as described in the labjack support section 7.2 (https://labjack.com/support/ud/df-lj-app-guide/7.2) for sending a warning email when the pressure is higher than a certain value. The only edit I need in the example code is that I want DaqFactory to send me an email when the pressure reading is above 80 for more than 10 minutes.

 

Thank you!!!

Share this post


Link to post
Share on other sites

OK, this is the line that checks the condition:

if ((Pressure[0] > 80) && (Pressure[1] <= 80))

To check for it to be over 80 for over 10 minutes you'd do instead:

if ((Pressure[systime(), systime() - 600] > 80))

The problem is not sending emails over and over again so you'd have to add some logic to prevent that.  It could be to repeated send every so often if the alarm state is maintained, or to only set if reset.  This is actually what the Alarming feature of DAQFactory makes easy.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this