LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using appended array

Hi Guys,

I'm having a problem with using appended array. I used appended array to save the values from the analyser and then use those values to draw a graph.  

                      I tried to save the values one by one on the rows. But I couldn't do it. I can only able to save on the same row only. when the next value excute, it is overwriting on the same row. I want to write the next value on the next row below.

Can anyone help me with this please? I have attached my VI with this post.

 

 

 

 

0 Kudos
Message 1 of 5
(4,169 Views)
Just a few quick notes on your program.  You have a False constant wired to the stop terminal of your while loop, without any kind of wait in the loop.  This while loop will spin infinitely and will dominate your CPU.  If you use autoindexing for your string array you dont need to index based on the for loop interation count.  You should make your DBL array constant a constant array of strings and place it outside the while loop.  You should also pass your error wire between iterations of both the while and for loops and possibly use the error to trigger a stop on the while loop.  You should try to avoid using the Build Array function inside of a loop.  Just a few suggestions for style.
Message Edited by jmcbee on 03-09-2009 01:45 PM
0 Kudos
Message 2 of 5
(4,163 Views)

Your code make very little sense, so I don't understand what you really want.

  1. Do you want a 2D array, a column for each iteration of the FOR loop and a row per iteration of the while loop?
  2. Do you simply want to append all values as they appear?

Attached is a solution for (2), please specify exactly what you want. 🙂

0 Kudos
Message 3 of 5
(4,159 Views)

Is this what you are looking for?  (Beat to the punch!)

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Message Edited by jmcbee on 03-09-2009 01:59 PM
0 Kudos
Message 4 of 5
(4,154 Views)

Hi Guys,

Thanks for your help. I have solve the problem. Basically, I have to add a another shift register to the for loop to write the data on the appended array on the different row. Becase the values wont come outside the for loop until it finish its full iteration.

I have attached the new VI with this post.

 

 

0 Kudos
Message 5 of 5
(4,098 Views)