From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

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

Looping Input Tunnels!

Status: New

When autoindexing on a WHILE loop input tunnel, we get the default value for the datatype after we run out of elements on the autoindexing array. I can think of several scenarios where it would be useful to simply start over with the input array.

 

I propose a new input tunnel type (looping) which would do exactly that: index the elements to the end of the array, then start over from the beginning, ad infinitum (or until the loop stops).

 

(The same would of course also be useful for FOR loops. Here it would not be used to determine the loop count, because it never runs out of elements.)

 

Here's how it could look like in the code. (On the right, I show explicit functional equivalents).

 

18 Comments
altenbach
Knight of NI

Note that I use the audio terminology of looping, which might be confusing because we already have loops in the code. I think it is OK, but I am of course open to better naming ideas. 🙂

 

  • looping?
  • recyling?
  • repeating?
  • reusing?
  • ...
Wart
Member

Since it is still indexing the array I'd like to see the "index" stay..

 

  • infinite index?
  • looping index?
  • repeating index?
JW-JnJ
Active Participant

+1 for repeating index... to matching autoindexing, lets call it repeat indexing

Josh
Software is never really finished, it's just an acceptable level of broken
crossrulz
Knight of NI

I was thinking Looping Index


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
GregR
Active Participant

This is similar to the concept of a circular buffer, so you could call it circular indexing.

dthor
Active Participant

Circular is definitely my vote.

 

Also, cool Idea! Not sure when I'll use it, but I definitely like it.

GoofyWires
Member

This is useful for any case where there is some indexing action and it is not exactly terminal/wire related but rather index related.

I could have offered a change to the idea where we have a property node to the index terminal in order to create a secondary sub index terminal but it won't be general enough as well.

The most general option is to add a general cyclic block (wraps the reminder for easy of use) and to incorporate the conditional auto indexing tunnel in a more sophisticated way that handles cycles among other things in a pop up wizard once the tunnel is double clicked.

GregFreeman
Trusted Enthusiast

I could definitely see this being useful if doing some sort of simulation.

GregSands
Active Participant

I vote for "Circular" too -- fits with the symbol as well.

AristosQueue (NI)
NI Employee (retired)

altenbach, can you enumerate some of the use cases that you have for this feature? I'm guessing you have some sort of "control this hardware" scenario in mind where you keep iterating over the same list of commands?