05-13-2016 04:58 AM
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.
05-13-2016 05:26 AM
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.
05-13-2016 06:26 AM
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.
05-18-2016 07:50 AM
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?
05-18-2016 08:25 AM
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