From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(2,674 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
(2,669 Views)
Wow, that was quick. Great help, thanks!!!!
0 Kudos
Message 3 of 3
(2,655 Views)