LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
smmarlow

Progress Terminal for FOR Loop

Status: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.

Add a progress terminal that outputs a 0-100 value representing %complete for the loop.  The terminal can be enabled/disabled like the conditional terminal.  The compiler would discard the code behind it if it is not used.

 

23032i1D059572AE00CD5B

12 Comments
altenbach
Knight of NI

This is relatively trivial to compute from [N] and [i] so I am not sure we need this.

 

In any case [P] is not good, it's already taken to configure parallelism.

stbe
Active Participant

As altenbach suggests, this already exists as "completed" solution: http://forums.ni.com/t5/LabVIEW/Darren-s-Weekly-Nugget-06-26-2006/m-p/383560

_________________________
CLA
smmarlow
Member

Forgot about the new parallel terminal.  Thanks.

Dragis
Active Participant

not that it saves a whole lot of work, but i could see labview allowing you to wire a progress bar (or any other numeric) reference into the left (input) side of the iteration terminal and getting the behavior you suggest. i can't really think of anything else that would be useful to wire INTO the iteration terminal other than a reference. thoughts? 

smmarlow
Member

@asco that's a good idea, but I would still perfer a separate terminal.  perhaps one labeled with the % sign instead of P, which altenbach reminded me is taken. 

 

@altenbach It is true that the computing from N and i is 'trivial', but it's also expensive if you do it often enough.  Also, N is fixed in the upper left which can contribute to messy diagram.  Perhaps a sliding N terminal?

 

@stbe The "solution" you cite is a pop-up dialog that achieves its behavior using propery nodes.  I generally avoid such code.

smmarlow
Member

Use % instead of P for the terminal label.

 

23152i107EF6130103CE68

Intaris
Proven Zealot

@smmarlow

 

Regarding the computation being expensive.... You think because the For-Loop has a terminal for something that it doesn't need to be calcuated?  You can also calculate the % values BEFORE the loop runs.  It's still trivial.  But you still have N calculations to do....

smmarlow
Member

@Intaris

 

By expensive I mean time and $$$, not computation.  From the context of my previous post, I can see why you would take it to mean computation.  Sorry for the confusion.

crossrulz
Knight of NI

I typically use a property node to set the max value of the progress bar BEFORE going into the for loop and then I simply pass the i straight into the progress bar terminal (maybe with the increment depending on how picky I am being).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
usrfrnly
Member

i like the idea of a progress terminal. it would especially come in handy when you're using parallel loops. Every time i try one of the normal means for mapping progress enumerated above for a parallel loop, it fails or acts glitchy.