LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce CPU Load.

Hello All,

 

I am using LabVIEW 8.2.1. I would like to update the front panel at the rate of 5 ms. I am attaching example. The example takes more than 60% CPU load of my PC. Please let me know, how can I reduce the CPU load for the update.

 

Thanks,

0 Kudos
Message 1 of 10
(4,852 Views)
Replacing the property node with a local variable improves it slightly (and that's an optimistic statement). However, a quick test indicates that the front panel update is what's chewing up the whole time. If you don't update the front panel the VI barely registers on a CPU meter. That said, why do you need to update the front panel every 5 msec? The human eye has a threshold of about 30 fps. Any changes occurring faster than that is imperceptible.
Message Edited by smercurio_fc on 01-19-2010 12:57 PM
Message 2 of 10
(4,835 Views)

Thank you for your response. Even if I make 30 fps, it shows the same CPU load. If the front panel takes that much CPU load then I do not have much process left to do other process.

 

I need to read AI/DI/AO/DO(32) simultaneously with the rate of 5ms. If I do those then my CPU load will be 100%.

 

So I need to reduce the FP update CPU load.

 

IF I do the same in VB, it is taking only 5%. So please let me know any other way to reduce.

 

Thanks

 

0 Kudos
Message 3 of 10
(4,821 Views)

I think your performance problem is related to the overlapping display elements and grouping in the cluster. Try ungrouping the cluster elements, then distribute the elements vertically or horizntally. Your CPU load should drop to ~ 20%.  If you only update evert seventh sample, it should drop to ~ 6-8%.

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 4 of 10
(4,807 Views)

Good catch on the grouping and overlapping - I hadn't noticed that, and I don't quite understand the need for it.

 

To OP: For instance, why do you place a transparent string indicator with green text over a black colorbox? Why not just color the string indicator such that the background is black? You'll get the same result.

0 Kudos
Message 5 of 10
(4,797 Views)

smercurio_fc wrote:
Replacing the property node with a local variable improves it slightly (and that's an optimistic statement).

Why a local variable? Place the terminal inside the loop where the property node currently is. 🙂

 

Yes, the CPU use is high, independent of the loop rate. Even at 500ms, the CPU is quite high.

 

I fixed the overlapping objects problem in the cluster, but CPU use is still high. (overlapping objects are significanlty more expensive to redraw.

0 Kudos
Message 6 of 10
(4,793 Views)

altenbach wrote:

smercurio_fc wrote:
Replacing the property node with a local variable improves it slightly (and that's an optimistic statement).

Why a local variable? Place the terminal inside the loop where the property node currently is. 🙂



 

Yes, obviously. Just pointing out that a local variable would not have the switch to the UI thread that the property node would have. You know, to concur with much we LOVE local variables on this forum.  Smiley Very Happy

0 Kudos
Message 7 of 10
(4,784 Views)

I also did check with out overlapping indicator, but still its the same load.

 

I need the over lapping indicator, because some times I need to change the color of one perticuler array element in some conditions.

 

I can not change the color of a string control in array. It changes for all. I hope you got the point, why I need the overlapping controls.

 

 

0 Kudos
Message 8 of 10
(4,782 Views)
I am also curious why you use a string indicator instead of a simple numeric for the random number.
Message 9 of 10
(4,775 Views)

It was just an example. In my project, the value can be a number or a string.

 

0 Kudos
Message 10 of 10
(4,756 Views)