Gorkhali Posted June 14, 2019 Share Posted June 14, 2019 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 More sharing options...
AzeoTech Posted June 19, 2019 Share Posted June 19, 2019 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.