ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

for loop array issue

Solved!
Go to solution

I am really new to programing in labview (started on Monday). I have been following the labview toturials online and in NI website, but I not been able to solve it.

 

 

Edit: all of the values in the array are the same.....

 

 

Perhaps, someone here can take look at it.

0 Kudos
Message 1 of 34
(4,427 Views)

What you want to do? 

 

What you have tried so far? Upload in 2011

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 34
(4,411 Views)

I just to store all the calculated values in the for loop into the array. Please look at the picture attached above

0 Kudos
Message 3 of 34
(4,408 Views)

Like I said update yours as its not clear here.

 

See my attached VI, I am calculating and adding all the calculated value at last

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 34
(4,404 Views)

Nope..... 

still not clear what are you asking

do you want some values after For loop in an array and you are not getting it???????

0 Kudos
Message 5 of 34
(4,400 Views)

The vi has lots of sub vi,so I am not sure how to post them all.  I have attached picture of the array values

0 Kudos
Message 6 of 34
(4,395 Views)

You can explain the problem what output you are expecting ( and why , where )

and what you are getting

0 Kudos
Message 7 of 34
(4,392 Views)

For instance, I run the for loop 4 time:

 

if I get a value of [2, 5] at the last iteration.

 

My current array looks like this [2,5,2,5,2,5,2,5], when it should be like this [3,9,5,1,4,3,2,5]

0 Kudos
Message 8 of 34
(4,385 Views)

Ok .........

Look at the build array function , you are giving it two values at a time. So it is creating an array of say ( 3, 1)

every iteration your are creating a new array .

So to get full array at output you need to put your tunnel mode as indexing then you will get a 2D array containing all elements.

 

 

Lot of explanation beacuse you just started learning LabVIEW.Smiley Very Happy

0 Kudos
Message 9 of 34
(4,381 Views)

Nope, it still does not work. Now I getting a 2-d array like this...

 

[2,5]

[2,5]

[2,5]

[2,5]

[2,5]

0 Kudos
Message 10 of 34
(4,377 Views)