ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

取消
显示结果 
搜索替代 
您的意思是: 

run once inside timed loop

已解决!
转到解答
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 项奖励
1 条消息(共 17 条)
4,917 次查看

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 项奖励
2 条消息(共 17 条)
4,912 次查看

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

3 条消息(共 17 条)
4,904 次查看

Ahh, now I get it. Just one email per error, good morning 极度高兴的表情

 

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

 

Best Regards

 

David

0 项奖励
4 条消息(共 17 条)
4,900 次查看
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 项奖励
5 条消息(共 17 条)
4,878 次查看
In your ap, what good is a For Loop that runs once?
Richard






0 项奖励
6 条消息(共 17 条)
4,869 次查看
That was an attempt at solving my problem of non stop emails but I soon realized that would not do anything.
0 项奖励
7 条消息(共 17 条)
4,866 次查看

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

Richard






0 项奖励
8 条消息(共 17 条)
4,863 次查看
解答
接受人 icemaker
You might also consider using  the First Call? primitive under the sychronization pallette.
Now Using LabVIEW 2019SP1 and TestStand 2019
0 项奖励
9 条消息(共 17 条)
4,859 次查看
Looks like the first call will work for me.
0 项奖励
10 条消息(共 17 条)
4,857 次查看