From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer in a while loop

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(3,528 Views)
Solution
Accepted by topic author CYTeoh

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.

0 Kudos
Message 2 of 7
(3,526 Views)

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 

0 Kudos
Message 3 of 7
(3,520 Views)
Pay attention. You were told you can use the Elapsed Time function. Look at it. Make sure Context Help is turned on.
0 Kudos
Message 4 of 7
(3,518 Views)

Dear 

 

 

 

 

CYTeoh

 

0 Kudos
Message 5 of 7
(3,509 Views)
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.
0 Kudos
Message 6 of 7
(3,503 Views)

ok. I got it.

 

Thanks to 

0 Kudos
Message 7 of 7
(3,498 Views)