LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

starting while loop with a delay

Solved!
Go to solution

Hello,

 

         A  simple question. Is there a way to start a while loop after 2 sec delay? 

 

 

thanks.

0 Kudos
Message 1 of 5
(3,803 Views)
You could enclose all of your "working code" in a case statement, have the loop running (at whatever loop rate < 2 seconds) and in the "non-working code" case check for an elapsed time of 2 seconds. If you need to have it be more accurate you could have a sub-vi that waits two seconds, but has an internal "first call?" from the "Syncronization pallette, to allow it to wait only the first time through the loop. The first example I gave has the possible error of a whole "loop time", the later is only limited to the accuracy of your timing source.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 5
(3,797 Views)
Solution
Accepted by topic author gsajja

Here is what I mean

 

 

 

time vi.PNG

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 5
(3,788 Views)

You could do this.

 

While loop with 2 sec delay.png

Tim
GHSP
Message 4 of 5
(3,787 Views)

aeastet,

 

                 Thanks for the reply. Looks like a possible solution I was looking for. 

 

 

0 Kudos
Message 5 of 5
(3,781 Views)