LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Efficiently getting data from sub-vi.

In my main vi I am calling a sub-vi to perform continuous data acquistion on 5 AI channels (10 samples at 1000 Hz).  I am pass references from my main Vi to the sub-vi so I can monitor certain variables.  At the end of my data collection I need to dump all the data I collected to a file.  Overall the program works pretty well but I having some memory issues.  Right now I convert the waveform array I get from the analog sample to dynamic data type (makes some of the manipulation I need to do easier).  I the scale and add the waveforms and split the resulting signals between a graph that is in the main VI and the Append Signal VI (see the partial image of the sub vi).  The appended waveform is then passed to the shift register and the process begins again.  Things run fine for a short period of time (15 - 20 seconds) and then gets bogged down and eventually crashes due to buffer overflow.

 

My main question is this: is there a better way of compiling the lengthy time series data?  I know I could switch to using a single data grab for a fixed period of time but I started with the continuous sampling in hopes of being able to monitor the data in real-time in the main vi.  (This has only partially worked out so I will have a follow up question about graphing the signals over a wider time range than the sample time.)

 

Thanks.

0 Kudos
Message 1 of 2
(2,349 Views)

Hi,

 

you should take a look at the buffer allocations in your vi (Tools, Profiles...). It will probably show you that "convert to dynamic data" creates a copy of your data.

There is a vi to append waveforms data without the detour.

I'm sorry - that's all I can see in the picture.

 

Regards Florian

0 Kudos
Message 2 of 2
(2,265 Views)