NI Home > Community > NI Discussion Forums

LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Posts: 71
0 Kudos

changing iteration count of a while/for loop

Hi,

By default the for/ while loop iteration count will start from '0'. I want my loop to start with any other value say '10'.

Is it possible to change the value of loop count , so that it counts from '10' (in this case).

Member
Posts: 85
0 Kudos

Re: changing iteration count of a while/for loop

There is no built in way to customize the behavior of the iterator, but you can perform any math you wish to it in your program. In this case just add 10 before you use the iterator.

iterator.PNG

Member
Posts: 71
0 Kudos

Re: changing iteration count of a while/for loop

Thnx a lot Smiley Happy

Bt I already know this method. I was looking for some other method if available.

And we can also do the same using shift registers. Smiley Happy

 

Regards,

Runjhun.