LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run once inside timed loop

Solved!
Go to solution
I have a timed loop that monitors equipment. Whenever there is a fault I have it send a notification email. My problem is how to stop it from sending email every single time the time loop is executed. I tried placing the send email inside a for loop but quickly realized that the entire loop itself is reiterted. Any help is much appreiciated.
0 Kudos
Message 1 of 17
(3,838 Views)

Hi icemaker

 

I'm not really sure what you mean. Wouldn't a case structure be a solution?

 

case structure

 

Could you post some code so we can see what you are doing?

 

Best Regards

 

David

NISW

Message Edited by Davidek on 10-02-2009 09:58 AM
Message Edited by Davidek on 10-02-2009 10:00 AM
0 Kudos
Message 2 of 17
(3,833 Views)

This is very similar another enquiry today...

 

One possibility: Add a boolean shift register to your loop, initialised outside the loop. When an error occurs and you send your message, set the boolean to a value that means you've sent your message. Your "send a message" should avoid sending a message if the flag says you've already sent one.

 

You may also want some means to reset the flag so you can send mesages again. Maybe make the shift register hold the time you last sent an error message, so you can send another one after a certain time has elapsed.

 

Just a thought.....

 

Rod

Message 3 of 17
(3,825 Views)

Ahh, now I get it. Just one email per error, good morning Smiley Very Happy

 

Rod's suggestion is very good, you should give it a try.

 

Best Regards

 

David

0 Kudos
Message 4 of 17
(3,821 Views)
I am going to give Rod's suggestion a try. In the meantime here is a snippet of my loop. Still new to labview so any suggestions are greatly appreiciated.code.png
0 Kudos
Message 5 of 17
(3,799 Views)
In your ap, what good is a For Loop that runs once?
Richard






0 Kudos
Message 6 of 17
(3,790 Views)
That was an attempt at solving my problem of non stop emails but I soon realized that would not do anything.
0 Kudos
Message 7 of 17
(3,787 Views)

Have you fixed your non-stop emails yet? You screen cap doesn't have the solution (shift register).

Richard






0 Kudos
Message 8 of 17
(3,784 Views)
Solution
Accepted by topic author icemaker
You might also consider using  the First Call? primitive under the sychronization pallette.
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 9 of 17
(3,780 Views)
Looks like the first call will work for me.
0 Kudos
Message 10 of 17
(3,778 Views)