LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I monitor VI run time?

Solved!
Go to solution
I have tried using the Elapsed Time express vi, in both the sub-vi as well as my main vi. What I get out is the elapsed time only updates on the "sub-vi" when it finishes each process, and the calling vi only updates the elapsed time when the sub-vi finishes. My sub-vi takes approximately 7 hours to run, so I would like continuous updates so the user knows about how long is left to run. Is there a better way to have an elapsed time displayed?
0 Kudos
Message 1 of 7
(3,328 Views)
Solution
Accepted by topic author T_Bragg
You could use a global variable or a functional global to pass elapsed time up from the subvi to the main vi.   In your subvi you need to periodically poll the elapsed timer so it can be passed up.  You could put the elapsed timer in a parrellel loop in your subvi.
Brian
0 Kudos
Message 2 of 7
(3,319 Views)

As I understand it you have an elapsed timer in your subvi to show the execution of each process and an elapsed timer in your main vi to show the total time.  I was wondering if you have set the Auto Reset off (to False) on the elapsed timer in your main vi?  By default Auto Reset is set to true, which means every time you start a new loop in the main vi, the timer starts over again.  By setting the Auto Reset to False, the total time will accumulate.  You can  then create an indicator inside the main vi and attach it to the Elapsed Time output of the elapsed time.vi. 

 

I hope this is helpful. 

 

John

0 Kudos
Message 3 of 7
(3,306 Views)
You could also use a reference. Some people in this forum are very hostile both global and locale variables. Just use them with care;). They want ruin your application if you have a few containing a small amount of data, that are not updated to often


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 7
(3,300 Views)

I simply added a parallel loop that only contains the Elapsed time function. This will work just fine.

 

Thanks,

0 Kudos
Message 5 of 7
(3,288 Views)
I aslo hope you put in a "wait (ms)" in that loop, set to say 1000 😉


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 7
(3,285 Views)
I spoke too quickly. The parallel option look good, but then I realized, if I place it in my main VI it will not stop when the main function is done. If I place the elapsed time in the sub-vi, I still won't get updated in the main vi until the sub-vi is done. How do you periodically pass information from the running sub to the main, without the sub actually completing?
0 Kudos
Message 7 of 7
(3,283 Views)