LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get the value to decrement per iteration

Solved!
Go to solution

Hi, new to labview here I'm writing a program that has a resistor (R1) decrement by 10 each time for 10 iterations the program runs and is then plotted on a waveform graph but no matter how i try to get it to work it never does -10 for each iteration of the loop, the best i could get it to work was to do all 10 loops at once leaving me with 10 version of a -100 rather than -10 for each version. Any ideas?

0 Kudos
Message 1 of 6
(512 Views)

labidk.png

 forgot to add what I've done so far as reference to what I am running now.

0 Kudos
Message 2 of 6
(497 Views)

Try putting everything into one FOR loop instead.

 

(Also place the controls before the loop, because they should probably not change during the iterations.  Please use graphical code, not formula nodes....)

0 Kudos
Message 3 of 6
(462 Views)
Solution
Accepted by topic author icaruopia

See if this can give you some ideas...

 

altenbach_0-1710980354658.png

 

0 Kudos
Message 4 of 6
(459 Views)

Yeah that works great! Thanks a ton you saved me a massive headache, one small question though, when I tried to use a minus with the shift register it just spat out the same value over and over was it because I had the constants inside the loop?

0 Kudos
Message 5 of 6
(455 Views)

You wired to the outside of the shift register, so you only get the final scalar result. I wired via an autoindexing tunnel, giving me an array of all values at the end, one for each iterations.

 

This is all beginner stuff, so make sure to go over the basic learning resources listed at the top of the forum.

0 Kudos
Message 6 of 6
(410 Views)