LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array appended from loop

Solved!
Go to solution

This seems like such a simple problem but I must not be looking at it correctly.  I am reading in a byte stream from a file and plotting the data in a waveform graph. The files are very large so I am reading in a portion of the data, running it through a vi that converts it to a 2D array and storing it in an array. This is done with in a for loop until the entire file has bene read. The data is then plotted.  My problem is when the loop completes all iterations the only data displayed is from the last iteration.  I have tried using shift registers and feedback nodes to carry the data from iteration to iteration and I have tried passing the data outside the array with an auto indexing tunnel. Each method creates a 3D array. I understand that if I index a 2d array naturally I will get a 3d array.  Instead of indexing I would like to append the data from each iteration.  Seems simple enough but I am having no luck.  Here is a snapshot of my vi.  Can anyone help?

 

DataAdd.PNG 

0 Kudos
Message 1 of 4
(2,864 Views)
If you right-click on the build array and select 'Concatenate Inputs' does that give you what you want?
0 Kudos
Message 2 of 4
(2,860 Views)
Solution
Accepted by topic author Humada33

You will not be able to do that unless the Feedback Node is initialized with a 2D array. Thus, you have to wire a 2D array to the initializer terminal of the Feedback Node.

 

That said, based on your previous thread, I'd like to see what you're doing in that little subVI that you have there. 

0 Kudos
Message 3 of 4
(2,854 Views)

,

 

That did the trick. I knew it was something simple.  This vi is for a different set of data from the same experiment but still a large set of data. Reading this data was a little more complicated than the other sets.  Here we are using Microstrain strain reading devices and the other set used all NI hardware.   As for showing you the sub vi I'm sorry but I can not post it with out permission from the author.

 

Thank you again for all the help.

 

Chris

0 Kudos
Message 4 of 4
(2,832 Views)