LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send email when vacuum reaches threshold

Solved!
Go to solution

Hello,

 

I have made the attached vi, which is supposed to take readings from a vacuum pump every second, average the last 60 readings, and report and log the result every minute.

 

When the vacuum gets below a certain threshold, I would like it to send one email notifying the user. However, it sends emails continuously. This is the part I am having trouble with.

 

How do I program it to send a single email when the vacuum crosses the threshold, but to not send any more emails?

0 Kudos
Message 1 of 5
(3,371 Views)

You need to "set a flag" when the threshold is reached and you have sent the email.

 

Check the flag each time you check the pressure, and don't send an email if the pressure remains low and the flag is set.

 

Remember to clear the flag when the pressure returns to normal so you will be ready to send another email next time.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(3,362 Views)

How exactly do I "set a flag"? I am new to this.

0 Kudos
Message 3 of 5
(3,337 Views)
Solution
Accepted by topic author helium_addict

Here is an example.

flag.png

Notice how the iterations keep counting but the emails sent only increments once for each time Pressure Low is true.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 5
(3,330 Views)

Just use Boolean Crossing PtByPt.vi


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(3,297 Views)