LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While Loop timing

I have a while loop that I performs many functions and has 3 sub-VIs. Each iteration of the loop takes 1.15 sec approximately. But I want the loop to execute every 1sec. Is there any way I can reduce the loop timing? Does having sub-VIs increase the timing?

What are the objects that contibute to the loop timing?

Thanks.
0 Kudos
Message 1 of 2
(2,630 Views)

A loop iteration can only finish once all code it it has completed. You cannot spin faster than it takes to execute everything in the loop.

Can you attach your code? Do you have a 1000ms wait in it? You should use a "wait next ms multiple" instead for a more consistent loop rate.

Make sure the wait can execute in parallel with the code and is not delayed by misguided sequence structures. What is the VI actually doing? Can you show us your code? How do you measure the loop rate?

0 Kudos
Message 2 of 2
(2,627 Views)