LabVIEW Idea Exchange

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

Fixed Iteration FOR loop option

Status: Declined

National Instruments will not be implementing this idea.

Today, if we want a FOR loop with a fixed number of iterations, we need to wire a diagram constant to N. We could probably save a few clicks if we could click on N and type in an integer directly. It would also unclutter the diagram. This should of course only work if N is unwired.

 

Of course the N-Box would grow to the right to accomodate all digits

 

To later change the loop back to "normal", we would type N into the box or simply wire something numeric to N from the left.

 

As an example how it could look like, here's a simple cross product implementation (Yes, I know, LabVIEW already has a cross-product, so this is just to show the idea!)

 

Top: current implementation

Bottom: Same code after this proposed idea has been implemented

 

 

 

26 Comments
AndyRR
Member

I think this idea would mostly bring confusion and only very limited benefits. In my own expreience it's not so common to know how many times a for loop will loop. Much more often the for loop will loop through an array or the number of iterations depends on some other variables. When I know the number of iterations then I think it's no problem to connect an interger to N as it's done now.

James_McN
Active Participant

I'm afraid I'm with the naysayers on this one. I'm concerned with some of these types of ideas that individually they seem like a nice ease of use feature (and I don't disagree with that) but if every one is followed we will end up 10 different ways of specifying how a for loop runs and every context menu will require a 50" screen to avoid scrolling. 

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
altenbach
Knight of NI

> and every context menu will require a 50" screen to avoid scrolling

 

Fortunately, this is a feature that does not need any right-click options or context menus, and it is immediately intuitive what it means. The code remains complety readable, even if printed on papyrus. 😄

 

A similar change could be implemented with the timeout value of an event structure.

SteenSchmidt
Trusted Enthusiast

> ...but if every one is followed we will end up 10 different ways of specifying how a for loop runs...

 

Then combine it with this to get back to an acceptable number of permutations Smiley Wink

 

> ...and every context menu will require a 50" screen to avoid scrolling.

 

There shouldn't be any huge context menus anyway, just simple context menus/ribbons that only display the actually available options for your immediate use case. And they should appear automatically, not activated by right-clicking. I'll elaborate on this in another idea.

 

/Steen

CLA, CTA, CLED & LabVIEW Champion
SteveChandler
Trusted Enthusiast

Beautiful! Just like the Boolean constant redesign, it is simple and obvious. Well it is only obvious NOW Smiley Happy

=====================
LabVIEW 2012


Darren
Proven Zealot
Status changed to: Declined

National Instruments will not be implementing this idea.