LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Increments for for loops

Solved!
Go to solution

HI,

I am attempting to do a for loop similiar to the following c text ( for i=32, i+2)

Please tell me if it is possible to increment in Labview by more then 1 in a for loop and secondly if I can start the loop at another number except for 0

Thank you

 

0 Kudos
Message 1 of 11
(3,231 Views)

You can multiply [i] by two and you can also add a constant to the result. That should be sufficient, right?

0 Kudos
Message 2 of 11
(3,227 Views)

Nope.  Loops start at 0 and increment by 1

 

Of course you can use "i*2" and N=17 to generate the series 0,2,4,6,8...,32


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 11
(3,226 Views)

You can also create your ramp using e.g. "ramp pattern" and autoindex the result into the FOR loop.

0 Kudos
Message 4 of 11
(3,221 Views)

As far as i tried I can not update I - I tried i +2 but that is good for the graph and not for the loop. I did not manage to to start i on 32

0 Kudos
Message 5 of 11
(3,217 Views)

You can not modify i. It tells how many times the loop has iterated and that is it. You can wire 32/2 to the N terminal.

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


0 Kudos
Message 6 of 11
(3,209 Views)

Thanks I will try but I still am interested to know if there is a way to start I on any number and increment by more then 1

0 Kudos
Message 7 of 11
(3,207 Views)

There are plenty of ideas out there to add this functionality in the future. (example)

0 Kudos
Message 8 of 11
(3,201 Views)

Thank you, I guess I will just have to work my way around this case, I have some ideas but i was trying to shorten it to one for loop

0 Kudos
Message 9 of 11
(3,195 Views)
Solution
Accepted by topic author Oferer

I usually do something similar to the following.

 

 

0 Kudos
Message 10 of 11
(3,191 Views)