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


Gorkhali

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!!!

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.