LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

seeking CPU load increasing

Hi

I have a nasty problem. When my program is running several days the cpu load increases.

I have a main. vi that acquires data and has one part of the user interface. In the background there are several sub program running. I can access those sub programs by clicking on buttons in the main vi. The sub programs are called by references. That means I can't run the NI "perfomance and memory" tool and get correct values.

How can  get rid of this problem?

Thanks for any help.

If it helps I could also post some printscreens of the vi's.

Yves
0 Kudos
Message 1 of 11
(3,584 Views)

Yes, it would help if you post screenshots of the VI's. Or better yet, attach the VI's. 

R

Message 2 of 11
(3,582 Views)
Running program for several days.Is it logging the data in c:?
Message 3 of 11
(3,571 Views)
Yes screen shots help.
 
CPU increasing, but how about the meory usage?
 
If its CPU and not memory then I have to guess that some object is being asked to do more work as time goes on, so...
 
Charts?
 
Graphs?
 
Tables?
 
Array indicators?
 
If all else fails start chopping out parts until the patient gets better. Then figure out what it was that removed.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 11
(3,563 Views)
see may be any reason,
you should also check for Virus in Windows.
 
0 Kudos
Message 5 of 11
(3,557 Views)
Thank you for your help.

Well, the memory is slightly increasing. From 1GB to 1.8GB. But this should not be the problem. This is mainly due to read files whose content is placed into a "multicolumn listbox".
The computer is a Intel Quadcore, 4GB RAM, Windows XP SP2.

The attached subprogram is a very lean one. (I wrote it for testing). And in general there are 60 or more of those subprogram running independently on the computer.


Regards,
Yves
0 Kudos
Message 6 of 11
(3,551 Views)

Smiley Surprised

I'll start with the "low hanging fruit" and leave the real work for others.

Start by replacing all of you "wait Until Next MS Multiple" with the normal "Wait ms" version. The reasoning behind this suggestions is this. As the time required to do your processing increases, you will eventually get to the point where the work takes longer than the wait. So when a loop iteration time becomes 1.75 the specified wait value, you will have missed one of the multples and the function returns after only wait 0.25 of the specified value. So as the work-load grows, the breaks become shorter. The other aspect of the Wait until... is that if you are using wait values that have a common factor, the "Wait Unitl..." effectively sets up all of you threads to wake-up at the same time (the common multiple) and fight for the CPU rather than spreading the work out.

I'll let others comment on others things you should look at. But while you are waiting, you may want to review the posts I have linked in this Tag LabVIEW_Performance.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 11
(3,529 Views)
Your explanation makes sense, Ben..
Message 8 of 11
(3,523 Views)
Ok. I'll change the "Wait ms" and see what happens.

I forgot to mention that the increasing of the memory is certainly due to the filling of the Listbox. I don't empty them when I close the Front Panel.

Yves
0 Kudos
Message 9 of 11
(3,494 Views)
@ Ben: why is the tag not working anymore. I had it open and when tried to reopen it I'm getting the forum homepage...Smiley Sad
0 Kudos
Message 10 of 11
(3,474 Views)