LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing a VI

Just a simple question, is there a way to time a VI from the moment I press run to when it stop execution.

 

I will like to have a display on my front panel that will start a count from 0secs to say 55secs when the VI actually stopped.

 

I tried to use elapsed time vi , but no display was seen

 

Thanks.

0 Kudos
Message 1 of 5
(3,031 Views)
0 Kudos
Message 2 of 5
(3,027 Views)

The way I undestood it, the display should count up while the VI is running.

 

Try this:

(Note that there should be a small wait in the loop, there is no reason to spin it millions of times consuming all CPU, because the final resolution cannot be better than 1ms anyway.)
Message Edited by altenbach on 11-19-2008 10:41 PM
0 Kudos
Message 3 of 5
(3,023 Views)

Thanks Pnt and Altenbach. Both codes work, but I am trying to have the time sequence just be able to stop execution when my VI stops, I do not want a situation that I will press the stop button to stop the timing VI code.

 

For example my VI uses three for loops, and I want to time the complete execution time(displayed on the front panel of course).

 

Thanks

0 Kudos
Message 4 of 5
(2,984 Views)
You can use the same code, but trigger the stop programmatically. Why don't you show us your code?
0 Kudos
Message 5 of 5
(2,976 Views)