LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
warren_scott

For Loop Percent Complete

Status: Duplicate

Often times, I have a set of code in a for loop that takes a while to complete, so I put in a progress bar on the UI.  The problem is the progress bar defaults to 0-100 range, and my for loop normally does not have 100 iterations. 

So.... I can either rescale the progress bar to the number of elements, or I can use the "N" and "i" to calculate the percent complete and use that.

 

Since I like to keep my progress bars as 0-100 (since that works nicely to also show a percent complete) and % complete is useful elsewhere, I generally always end up calculating % complete of my for loops.

 

Well, why can't NI calculate this for me automatically???  Something like expanding the "i" iteration counter in the loop also have a "%" box right next to it.

 

Example shown below should probably wire as a double instead of an int, but you get the idea!

 

ForLoopProgress.jpg

2 Comments
Dennis_Knutson
Knight of NI

This has been suggested several times. See here for the original.

Laura F.
Active Participant
Status changed to: Duplicate