LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building Large 2D arrays

I am building a program to display seismic data on a intensity graph. I read the waveforms for the file one by one and build to the previous waveforms to display on a intensity graph. The problem is that a file can contain up to 9000 indivdual waveforms and building an array that size is to slow of a process if I am trying to also display in real time. Another process I have tried is to display the last 200 shots using a shift register to build the array. But wiring a shift register with 200 elements to a build array is too much work for the little that is achieved. So if anyone has any suggestions on how I am to accomplish my goal please tell me.
 
Thank You
 
Beaton
 
 
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 1 of 4
(3,129 Views)

I am not entirely clear what you are saying. can you attach some sample code?

Is each row a "waveform datatype" or a plain 1D array? Are they all in different files? Are you growing the 2D array row-by-row? I assume that at program start you know the final size of the 2D array exactly. You should initialize an array of the final size, then replace rows with data as you read them in. If you are growing arrays, you are constantly causing expensive memory reallocations.

Of course you are aware that it does not make much sense to create an intensity graph with 9000 columns if your monitor is only 1000 pixels wide. You can predigest your data aond only send a reasonable subset to the graph.

To display the last 200 shots, you could just use "array subset". You could also use another intensity chart with a history lenght of 200.

Message Edited by altenbach on 02-22-2007 08:22 AM

0 Kudos
Message 2 of 4
(3,123 Views)
When I say waveform I mean 1D array, sorry. I tried your suggestion of build an array of the final size, which for my test file would be 3125 by 3241, and replace each subset with the proper data. This took longer than constantly building an array. Here is a short form of what I am trying to do, if you have any suggestions please post them.
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 3 of 4
(3,108 Views)
Well, there is no reason in the world to update the waveform graph at each iteration. 😮
 
Since you know the number of rows to read, use a FOR loop with an autoindexing output tunnel. The FOR loop knows the final size of the 2D array at program start so the final size will be allocated for the output tunnel. I assume that all your rows have the same size.
 
Try something like the following:
 
 

Message Edited by altenbach on 02-22-2007 12:33 PM

0 Kudos
Message 4 of 4
(3,095 Views)