|
|||||||||||||
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).

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. ![]()
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.
I could definitely see this being useful if doing some sort of simulation.
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?
You must be a registered user to add a comment here. If you've already registered, please log in. If you haven't registered yet, please register and log in.
Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
My Profile | Privacy |
Legal |
Contact NI
© 2011 National Instruments Corporation. All rights reserved. | E-Mail this Page
|
||

E-Mail this Page