LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment & initial value

I have made a labview program in 6.0. It increments a  0 value from 0 to 10 by 1. I have made a for loop for n=10. My problem it starts from 1 to 10. I also need to start from 0 i.e. 0 to 10. Now 0 to 10 is 11 values. If I put n=11, it takes from 1 to 11 still it does no ttake 0 to 10. Anyone can help?
0 Kudos
Message 1 of 4
(3,027 Views)
Maybe you could show your code to show how you are doing this.
 
Just wire a 11 to the loop "N" and the [i] terminal will go from 0 to 10. 🙂  Not much else is needed.
Message 2 of 4
(3,019 Views)

Hello, I quite agree with altenbach... I'd like to see your code Smiley Surprised...

What you are asking for seems obvious, maybe we are not talking about the same thing...


Message Edité par TiTou le 02-22-2006 07:29 AM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 3 of 4
(3,013 Views)

If you are incrementing a value in a loop, that intially starts as 0, then the wire immediately before the incrementing function will be value 0 and the wire immediately after the incrementing function will be value 1. If you want to produce a value range 0 to (n-1) then either just connect to the wire immediately before the increment function, or alternatively start with an initial value of -1 and then connect after the increment function.

Of course if all you want is an incrementing value of 0 to (n-1) then you should simply connect to the "increment" [ i ] terminal of the loop structure.

Mark.

No offense - but how can you have a forum rating of "Active Veteran" and yet be asking such a basic fundamental question?

Message 4 of 4
(3,000 Views)