LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1D array not populating

Solved!
Go to solution

In this example,

 

If I leave the index input open in the Insert Into Array VI, my

first record gets placed.

 

If I tie the index value to the current fetch record being processed,

the array does not populate.

 

My input stream is 30,000 records, multi-fetched 150 times for a total array

size of 4500000 elements.

 

Thanx

0 Kudos
Message 1 of 16
(4,779 Views)

Hi,

 

can u save ur example in 8.5.1 and repost it.......

 

did u try shift registers?

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 2 of 16
(4,769 Views)

I cannot run your example, because I don't have your hardware, but why don't you simply use "built array" in concatenate mode? No index necessary!

 

You also need a shift register or feedback node to retain the growing array. At the moment you are constantly appending to the empty array from the input tunnel. 

 

Since you know the exact size of the final array from the beginning, it would be much more memory efficient of you would initialize the array at the final size and then use "replace array subset" to fill in the data. 

Message Edited by altenbach on 12-23-2008 10:01 AM
0 Kudos
Message 3 of 16
(4,754 Views)

Here is the example in LV8.5

 

I will admit, the shift register method is not

sitting with me yet. I do need the fastest

method, since I plan on taking multiple 'frames'

of data back to back.

 

Thankyou

 

Jeez, I am having problems backreving the VI.

I just updated to 8.6 yesterin.

0 Kudos
Message 4 of 16
(4,734 Views)

here you are over writing the Output array....... and you are always inserting data into an empty array. this is the reason, array does not populate.

 

even if you want to take multiple frames of data back to back, you can use shift register with build array function..right???

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 5 of 16
(4,721 Views)

As I said, you need to familiarize yourself with dataflow. Here's the quick solution (not memory efficient) that uses a shift register and built array (concatenate mode) to grow the array.

 

Message Edited by altenbach on 12-23-2008 12:56 PM
Message 6 of 16
(4,718 Views)
Solution
Accepted by topic author csk

An here's the more memory efficient way, allocating the full array once and fill in real data as you go.

Message Edited by altenbach on 12-23-2008 01:02 PM
Message 7 of 16
(4,711 Views)

 

Thankyou again.

 

The way I am pulling data from the PXI-5122 digitizer is slow.

 

Its a multi-fetch method and reading the individual records (150 total, 30,000 elements ea)

takes a huge amount of time. Not sure that can be sped up.

 

I have an example running now capturing data into one large array that I will later

merge with the parsing routine you helped me develop.

 

This was the front end digitzer part. Later I will add the imaging display.

 

Thank you again and Happy Holidays.

 

-Chester

0 Kudos
Message 8 of 16
(4,694 Views)

Hi,

 

I need to insert a 1D array into a 2D array. 2D array is initialized as 0. I need to update the data from 1D array as every row of 2D array.

My 1D array consists of 1 row and 4 columns. 1 data/time string and 3 other strings.

I need to update the 2d array every second when the time stamp runs.i.e. 00:00:01 should be 1st row of 2D array & 00:00:02 should be 2nd row of 2D array.

Pls let me know any ideas.

 

Thanks

KB29

0 Kudos
Message 9 of 16
(4,159 Views)

Hi kb,

 

you should have created a new thread for your question...

 

Idea: use InsertIntoArray! Smiley Wink

One more idea: attach a VI to show us your own attempts on this problem...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 16
(4,157 Views)