LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

n=n-1

This may be an obvious question, but I just can't seem to wrap my mind around it. Besides using a formula node, is it possible to initialize a variable in a while/for loop so that you can increment/decrement it to whatever you like. So far, I have simply wired the iteration variable (i) but because it is always initialized to 0 and it only increments, I do not believe I can use it. What I would like the variable to do is to increment to a max number and once it reaches it, to start decrementing to a min number and then increment again and so forth, basically I want the variable to oscillate between the two max and min values.

Thank,

nilak
0 Kudos
Message 1 of 3
(3,232 Views)
here is something i wired up real quick... i needs a litle work but it will get you started...

Dan
Message 2 of 3
(3,227 Views)
Wow, that was quick. Great help, thanks!!!!
0 Kudos
Message 3 of 3
(3,213 Views)