LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

For loop iteration terminal should start other than 0

Hi Friends,
 
I got a simple doubt in For loop.
Like any other programming language (lets take example c)
 
for(j=0;j<10;j++)
 
where i can start j with 0 or else i can start with 1 and so on...
 
But in labview i couldnt see the option availble, by default it will start with 0 and run upto n-1
So, is there any other way to control this for loop iteration terminal...
 
Please let me know, that would be a gr8 help
 
Cheers,
Suneel.V
0 Kudos
Message 1 of 4
(2,553 Views)
Just add your constant to [i] for further processing.
 
 


Message Edited by altenbach on 06-30-2008 07:52 AM
0 Kudos
Message 2 of 4
(2,550 Views)
No, you cannot change the iteration terminal to start at anything other than 0. Instead, just use a shift register. You can initialize to whatever you want and then use the numeric and comparison functions inside the loop. It used to be that you had to use a while loop but now that the for loop has a conditional terminal, you can use the for loop.
Message 3 of 4
(2,542 Views)


Dennis Knutson wrote:
the for loop has a conditional terminal

I just had one of those "Oh man, my code could have been so much simpler" moments
0 Kudos
Message 4 of 4
(2,529 Views)