11-20-2008 08:44 AM
I'm working with CHART trend ActiveX in a Labview compiled EXE application. A DAQ acquired datas à 77Hz, one sample at time, a chart displays the last 30 minutes. But I display only 5 minutes on screen. After 2 days, starting and stopping trends, 2 values (constant) that are logged in activeX as upper and lower limits of the signal, starts to lag. The main signal from DAQ is OK but the 2 constants display with 15 s delay.
After 1 week, 1 minutes lag is observed on the main signal display and 2 minutes on the 2 constants.
Why? and how can I correct this issue?
I use 2 loops with Queue for acquisition and treatment. I use Quad Core CPU with 2 gig RAM and Windows Vista.
Solved! Go to Solution.
11-24-2008 09:09 AM
Hi Trembaly,
I have a few questions regarding your application:
1. Are you saving your data to an array? If so, the array would become extremely large and could cause preformance problems.
2. When you are seeing the performance problems, when you go to the processes tab of the task manager (ctrl+shift+escape), what does the memory and processor usage look like?
3. Do you get the same behavior when the application is run as a .vi rather than an .exe?
From what you have said, it seems like there is a memory leak of some kind, but I will need a little more info to determine exactly what is causing it.
Thanks!
11-24-2008 10:07 AM
Hi,
1 - The acquisition format is WaveForm Array, one by channel (actually 2 channels on DAQ USB-6008). For the treatment, two waveforms are extracted from the signal with INDEX WAVEFORM ARRAY VI. The resulting waveform passes throught Scaling and Offset VI. After This signal is sent to a merge signals function which is linked to the chart.
2 other signals also merge with the signal. These two signals are upper and lower limits. Operator enters these limits in a cluster. Cluster is "unbundle by name". The limits are then send to the merge signal function and send to chart.
The same process (computes) is done for data on second channel. The same three signals are merge and send to a second historical chart.
Also, these 6 signals and a timestamp are the Merge together and convert to a array. This array is sent to a buffer instruction. This buffer is then used to write data to a CSV file with Write To Spreadsheet File VI. I put a buffer info VI to look if the buffer grows up. But it never keeps more than 10 datas.
2 - The computer ressources seems to be OK. Vista certainly takes lot of memory. I think that about 100meg of free RAM stays in normal working (Vista + my NI exe + data acquisition + graphics ) . CPU usage is about 40% but only one of the four CPU seems to work harder than others. If I minimize the interface, (Which contains two historical trends keeping 30 min in memory, 3 pens each) CPU usage drops down to less than 5%. I set application to priorize acquisition. Something particular is when I open a notepad.exe and place it to hide the two historical trends. CPU drops down by 20%. Historical trends shows 5 minutes on screen when working. When we stops acquiring datas, all datas are showns on historical charts. We add a good video card to be sure it was not the problem. This issue still occurs. We did test many computers. Difference in results is the time it takes before the charts lags.
3 - Yes I do experiment the same problem either with VI or EXE.
Hope it helps!
Best regards,
12-01-2008 03:25 PM
02-11-2009 09:39 AM
Data acquisition is active for 30 minutes. When acquiring datas, only the last 3 minutes are display on screen. When the stop command is done, ActiveX display all datas acquired. The datas stay on screen until a new archiving is started. Operator can look and manipulate trends. On start command, I push an empty trend to the 2 activex and acquisition restarts.
The realtime trending is important because the operator do diagnostic with results on screen. So I Cannot refresh trends on screen slower than 1s. Is it possible to acquire datas at rate of 77Hz and refresh the chart every quarter or half a sec without losing data? Actually, the activex is refreshing itself 77 times/sec. Certainly the cause of memory leak. Note that 1 s means 40 feet lenght of product.
Best regards
05-19-2009 08:45 AM
Hi!
I Finally found the problem.
Even if I was using very good machines, 2 of the three pens begins to lag after 1 day.
The reason is that these 2 signals were define as Integer, the other is a waveform. Base time of thes 3 signals is not the same. One takes timestamps from the DAQ signal. The two others used the computer time. It seems the two clock are not synchronized. I rebuilt a signal using the daq timestamps for the integer values and that's it!
Best regards,