LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing 10 different datas into 2D array

Solved!
Go to solution

Dear all, 

 

I have having difficulties about array.
I would like to store 10 different set of string values generated every second into a 2D array which constantly grows larger and larger.

data1      15

data2      16                                         
data3      17    
          .                                  ---------->          [2D ARRAY] whic data is stored every second.
          .        

          .

 

 

thank you very much!

 

Message 1 of 7
(3,107 Views)

What is the format you want your 2D array to be in?  What have you tried?  Where are you stuck?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(3,105 Views)

Hi, thanks for your swift reply! 

I would like my array to me in 2D string.
I cant seem to find a way to store it into a 2D array. 
Could anyone help out with this? 
Any examples that i can refer?

Ultimately how could i store my values into a 2D array accordingly from the 10 set of datas?

would appreciate all your help. thanks in advance

0 Kudos
Message 3 of 7
(3,101 Views)

Did you try the Build Array to create the 2D array?

 

You really didn't add any helpful information.  Can you give an example of input data and how you want the data to be formated?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,092 Views)

The output of my 10 sets value were generated randomly and connected to a string indicator and i would like to store them into a string format of 2D array.

 

I have used some ways including the build array. I have even try putting them into 1D array but i do not know how to store it into a 2D array.
Could you provide a simple vi or illustration on how to store it?

Have i miss out any details that you need?


 A vi and png file attached.



Download All
0 Kudos
Message 5 of 7
(3,087 Views)
Solution
Accepted by topic author m3rv89

Ok, we need to talk about style really quick.

  1. The sequence structure and local variables are not needed because you can use wires
  2. Do not hide your stop button
  3. Do not let a loop like this just run without a wait of some sort.  You need to let other stuff use the CPU sometimes.

Ok, from what I can gather, you are trying to had the 2D array hold all of the past iteration values.  To do this, you need a shift register to hold the values.  Build the current iteration's data into a 1D array and then append that to the 2D array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(3,079 Views)

Crossrulz, thank you very much! 

0 Kudos
Message 7 of 7
(3,066 Views)