cancel
Showing results for 
Search instead for 
Did you mean: 

Timer in a while loop

SOLVED
CYTeoh
Member
Solved!

Timer in a while loop

Dear experts,

 

I would like to stop the while loop and save the data after 5 sec. How do I connect a timer switch to "loop condition" (red dot in while loop) so that VI will stop after 5 sec of recording?

 

Thank you.

 

Regards,

CYTeoh

6 REPLIES 6
Knight of NI
Solution

Re: Timer in a while loop

You can't. What made you think you could do something like that? Use the Elapsed Timer VI to tell you how much time has elapsed. You can reset it for the next trigger.

CYTeoh
Member

Re: Timer in a while loop

Message contains a hyperlink

Dear 

 

My application is need to turn off the VI automatically after 5 sec in a while loop. Could you suggest a way to do this?

 

Your help is much appreciated.

 

Thank you so much.

 

Regards,

CYTeoh 

Highlighted
Dennis_Knutson
Knight of NI

Re: Timer in a while loop

Pay attention. You were told you can use the Elapsed Time function. Look at it. Make sure Context Help is turned on.
CYTeoh
Member

Re: Timer in a while loop

Message contains a hyperlink

Dear 

 

 

 

 

CYTeoh

 

Dennis_Knutson
Knight of NI

Re: Timer in a while loop

Your understanding is completely wrong. You certainly did not turn on context help like I said or if you did, you did not read the help details. Nor did you pay any attention to the various outputs of the function. There is a Boolean output. Look at it! Then think about all of those dedicated people at NI that spent so much time writing the help file. Then think about all of those people that post questions who think that's easier than finding the answer themselves.
CYTeoh
Member

Re: Timer in a while loop

Message contains a hyperlink

ok. I got it.

 

Thanks to