LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Waveforms charts. LV gets slow over time.

Hello, 

 

I'm currently developing an application that captures data from four different channels of an A/D converter. This data is processed and different parameters are extracted: frequency, amplitude and phase. The application also captures the temperature from three different thermocouples. The purpose of this is to plot the evolution of the different parameters over time and this means that I need 15 different waveforms charts (amplitude, frequency and phase from four channels and the three different temperatures). 

 

From the performance point of view, it is possible? My experience is that the LabVIew gets slow when the charts have more data. When I start the application, the while loop that gets the data from the A/D converter and plots the data in the charts takes 2 min and after many hours it takes 10 min. This time is growing progressively. 

 

Do you think that it is a problem of the waveforms charts? Or maybe it is a memory leak?

 

Any help will be appreciated. 

 

Thank you.

 

 

0 Kudos
Message 1 of 5
(3,414 Views)

We would really need to see your code.  But I am guessing that you are using Graphs and building arrays inside of a loop.  Building arrays can get really slow over time since you are allocating more memory every time.

 

If you were using a Chart, there would be no need for building arrays since the chart keeps a history of samples.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(3,402 Views)

I agree. You can read a bit more about VI memory usage here: http://zone.ni.com/reference/en-XX/help/371361L-01/lvconcepts/vi_memory_usage/

Sometimes it is also good to think whether all data really needs to be displayed. Sometimes decimating the array before showing it on the graph can increase performance dramatically.

If you are interested, you can also read this: http://zone.ni.com/reference/en-XX/help/371361M-01/lvconcepts/vi_execution_speed/ Especially the part about defering panel updates.

0 Kudos
Message 3 of 5
(3,391 Views)

Thank you for your replies. 

 

I have deleted the waveforms charts and LV also gets slow over time. 

 

I'm building arrays inside the loop, but these arrays have a fixed length and I initialize them out of the loop. However, inside of the general loop there are also a 'for' loop and a 'while' loop. In these loops there are indexing signals and shift registers. Can these indexing signals getting slow the application?

 

 

0 Kudos
Message 4 of 5
(3,335 Views)

Well, if you attach your code (easiest done by attaching the VI in question, or if there are several related VIs in a folder, compressing the folder and attaching the resulting .zip file), we could answer your question without a lot of "guesswork" on our part.

 

Bob Schor

0 Kudos
Message 5 of 5
(3,329 Views)