LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help on changing array elements with For loop

Hi,
 
I'm wondering if anyone can help me with this problem.  I'd like to be able to modify elements of an array with For loop.  In the attached VI, my goal is to have an array of [0 1 2 3 4 5], but instead what I've got is [2 2 2 2 4 5].  I initialized the array with a value of 2 to help me identify which elements are changing.  Can anyone help me pointing where my mistake is?  Thanks.
 
Peter
0 Kudos
Message 1 of 3
(2,539 Views)
It's a classic issue for LV newbies. In this case you HAVE to use a shift register otherwise the modifications of previous cicles are lost.
It's all easier than it's seems, see attached vi.

bye,
manga
Message 2 of 3
(2,536 Views)
Thank you very much for your response, Manga.
 
0 Kudos
Message 3 of 3
(2,508 Views)