LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Relatively high cpu usage

Solved!
Go to solution

Hi,

 

I have a top level VI with in there  8 tabs. within each tab I have a sub-panel with also VI's running.

Everything works well but I noticed that I have a 23% cpu usage when I run the app.

When I run all vis apart from eachother cpu usage is very low, like 0-1% -monitored in windows task manager-.

 

I am on win 7 with coreI7 @ 3.5 ghz quad core with hyperthreading.

 

I have distributed all VIs over several threads -e.g. 'standard' 'data acquisition' etc.

so.... I'd like to know why the prog is using so much cpu and what to do about it.

There are no very fast while loops etc.

0 Kudos
Message 1 of 13
(6,829 Views)

@_Faust wrote:

Hi,

 

I have a top level VI with in there  8 tabs. within each tab I have a sub-panel with also VI's running.

Everything works well but I noticed that I have a 23% cpu usage when I run the app.

When I run all vis apart from eachother cpu usage is very low, like 0-1% -monitored in windows task manager-.

 

@I am on win 7 with coreI7 @ 3.5 ghz quad core with hyperthreading.

 

I have distributed all VIs over several threads -e.g. 'standard' 'data acquisition' etc.

so.... I'd like to know why the prog is using so much cpu and what to do about it.

There are no very fast while loops etc.


You have painted a picture of an iteraction issue that prompts me to ask if you have tried all possible combinations of the eight to determine if two or more are fighting with each other over some shared resource?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 13
(6,818 Views)

Also you need to make sure that there aren't "things" in the sub-vi's that are actually causing them to use the UI thread, an already pretty busy one. Some of the things are using property nodes to update controls in the sub-vi's, using .dll's that aren't able to be marked "run in any thread" (the default is the UI thread).

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 13
(6,813 Views)

THere aren't any over-lapping objects when run in the sub-panels are there?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 13
(6,810 Views)

Ben,

 

What do you mean by overlapping objects?

 

I think there are plenty of things running in the user interface thread, there are plenty of property nodes around, although

I try to use them as little as possible as I've understood that a property node forces a screen update.

 

How can I control whether a screen update occurs or not?

When I am viewing another tab, can I temporarily 'hold' vi's in others or stop their updates?

 

0 Kudos
Message 5 of 13
(6,790 Views)
Solution
Accepted by topic author _Faust

Over-lapping

 

When part of the screen used to display one object is shared by another object (in edit mode selct both and observe if the selected region have common screen realestate) both images have to be updated to update the screen.

 

Non-showing tabs should not update until you switch to them.

 

FP Defer.Update when set true will do ONE screen update then prevent all further updates until it se set false again.

 

In about LV 8.2 -8.6 there was bug where the defer in a sub-panel was not working.

 

In about the same version range there was bug where re-sized property nodes invoked more than one call of the UI thread.

 

I still want to hear bout your attempts to investigate which object are fighting with each other over CPU.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 13
(6,783 Views)

Well there are plenty objects overlapping, to give you an impression about how the prog looks like, see the attached figure.

 

I have no clue where or how to start figuring out why it is using so much cpu.

For example:when I start a blank vi and just put in 5 while loops having a control updated, I dont see my cpu usage rise very high. Probably cause its only using one core but still.

 

 

Most while loops have delays of 400 ms at least and I have plenty of loops with events.

Last, I have on 4 places timed loops -in different vi's-

And I uses queues only to pass around data, usually a 1 element queue with a cluster in it.

 

 

 

0 Kudos
Message 7 of 13
(6,768 Views)
Solution
Accepted by RavensFan

well well well it is solved.

 

I started disabling vi's from the main vi one by one and discovered that there was one VI where I didnt put a wait in the while loop.

 

It was a while with a case, where usually the true case is executed -it does something-, however when the prog is in idle mode it doesnt do anything and I shouldve put a wait there.

 

Soooo problem solved sorry for bothering you guys.

 

Message 8 of 13
(6,751 Views)

I appreciate you marking my post as the solution but your final post holds the real answer so for those that search and find this thread, it would be better that your post is marked as the solution.

 

Take care,

 

Ben

 

PS IN the option in the top right of my post there is an option to revoke...

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 13
(6,744 Views)

Hello, Can you please clarify a bit more? Because I am having the same problem. Once I run the simulation, the CPU's cooler starts to cool down the CPU. I am using Win10 (64 bit) with I7-9th generation. Multisim (version 13 , 32bit).

 

Please advise...

 

0 Kudos
Message 10 of 13
(5,049 Views)