LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Insert Into Array" VI stops working

We have created a data acquisition program that communicates with severalinstruments (energy meter and oscilloscope for example) and stores the data
taken by each piece into a data array. We have succesfully created a working program that accomplishes this. At the completion of the program,
we prompt the user if they would like to start a new test. This is essentially accomplished by placing a large while loop around our program. This all works fine.

We are now adding to our program the capability to run this same tests at number of different temperatures.
When the progrm is first run, we are able to collect the data just fine, even at different temperatures. However, once we allow the user to start a new test, one of ou
r "Insert Into Array" VI's that came as
part of the LabView VI Library no longer works. We have probed the program and verified that the VI is receiving the appropriate inputs, but it just
won't seem to respond. If we turn off LabView and run our program again,it will again work until we try to repeat another test without shutting down Labview first. We do not recieve any error messages associated with this problem. The "Insert Into Array" VI simply refuses to merge together our two data arrays and outputs a null array. This problem is very
puzzling since the only real modification that we have made is to add one more row of information to our array, as well as one more loop outside the previously existing program. Our only thought is that it is something somehow memory related. Any ideas?
0 Kudos
Message 1 of 3
(2,685 Views)
From your questioning I suspect you are relative new to LabVIEW. Have you ever tried the profiler ("show profile window") to see how fast your code runs and what memory it takes?
This enhances your insight in what I believe is a memory allocation problem of a large array.
Try to define the array before your experiments and replace the elements. Search this site for hints on code optimization. This will explain you how the memory allocation of arrays work in labVIEW, and how to take advantage of this.
0 Kudos
Message 2 of 3
(2,685 Views)
Thanks, I appreciate your advice. I will try the profiler and see what I can find out.

Also, after I posted the question, I found a way around the problem. Instead of using Insert Into Array, I created a dummy array and replaced the elements with my data. This took a lot more steps, but at least seems to be functioning correctly.
0 Kudos
Message 3 of 3
(2,685 Views)