LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

progress bar_elapsed/expected duration

Hi all,

 

Has anybody ever tackled this problem and come up with a solution for a progress bar which displays elapsed and estimated time.

 

In order to do this the VI should realise:

 

- N iterations

- i iteration (current)

- what is the average time per iteration (as a running average)

 

Has anyone done this?

 

What about the .NET implementation of a progress bar.  Does anyone know how to use it?

 

Thanks.

0 Kudos
Message 1 of 10
(4,325 Views)

i guess there is one somewhere in this forum created by Daren.

 

Try his nugget posts.. may be this

Message Edited by Guruthilak on 02-01-2010 03:44 PM
Regards
Guru (CLA)
Message 2 of 10
(4,317 Views)

Hi.

 

Could this be something helpful?

 

It does not calculate the average time per iteration. In this example I use time delay variable instead.

 

Code for LV 9.0.

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
0 Kudos
Message 3 of 10
(4,298 Views)

Sorry for two posts in a row.

 

I have modified my VI a bit for it to match your needs better while including this point also:


@battler. wrote:

 

In order to do this the VI should realise:

 

- what is the average time per iteration (as a running average)

 


 

I am very novice to LV, so if this won't be what you really need, maybe it will leastwise give you some ideas putting you in the right direction.

 

Giedrius

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
0 Kudos
Message 4 of 10
(4,289 Views)

Hi there.  Thanks for the effort.

 

I think it's a good start but needs refinement.

 

I have attached an image of the block diagram for others to look at:

 

Progress bar with Time elapsed-est.png

 

Please post your suggestions.

0 Kudos
Message 5 of 10
(4,251 Views)
could be better if you fix those coercion dots.... 🙂
Regards
Guru (CLA)
0 Kudos
Message 6 of 10
(4,243 Views)

I think that's the least of our worries with this VI.

 

What about the sequence structures with separate timers..

0 Kudos
Message 7 of 10
(4,230 Views)
Would the time source not have to be external to this VI?
0 Kudos
Message 8 of 10
(4,229 Views)

Guruthilak wrote:
could be better if you fix those coercion dots.... 🙂

That is true. I should also move the part of the code for the elapsed time measurement and the stop button outside of the sequence structure to the body of the loop. While I am a novice, I still need to learn to code more correctly.

 

But in this case all of that should not be a problem for the author of the question. The point is if the provided algorithm to implement the task given by the author is ok or is it not 🙂

 

The algorithm in each iteration measures the time used to implement the task and calculates the average of time used per iteration. If you will change the time delay (or if some iteration will require more or less time) the average and therefore the "expected time of execution" will converge to the appropriate direction. In parallel, the "execution time left" is also adjusted to correspond to the differencs occured. We also have the progress bar and elapsed time indicated too.

 

Excludind the "ugliness" of the code, maybe there is some lapse left. I'll leave this for you guys to find out. 

 

 

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
0 Kudos
Message 9 of 10
(4,214 Views)

I have made some minor changes.

 

Progress bar with time stats.png

 

The code works fine to me:

 

Front_panel.jpg

 

But maybe something more specific is required. :smileyindifferent:

---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
Message 10 of 10
(4,202 Views)