LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

queue CPU usage 100%

Hi!!
 
I have developed a LV program  (LV 8.0) that interfaces with a PLC (cheap make) via Ethernet.  My data acquisition part works fine.  When I try to display the huge amounts of data on multiple tabular displays, my CPU usage shoots up to 100% and the system hangs.  I have attached a portion of my code where I try to display the data.  If anybody can take a peek at it and provide your suggestions/comments, I'd really appreciate it. 
 
Note:  You will not be able to display any data on the table since this attachment is a part of a bigger code, which acquires the data from the PLC.
 
Looking forward to your responses.

Thanks
KM
0 Kudos
Message 1 of 14
(4,045 Views)
How much data?  What is the memory usage look like when you have written the data into the queue's?  Does it work for a period of time, then bog down? 

Paul
Message 2 of 14
(4,028 Views)
The size of the data is approximately 50,000 bytes.  The memory is about 60MB.  The PF usage (Task Manager) is about 390 MB.  Yes, the program runs for a few hours and then bogs down, especially when I switch between different modes (booleans) as shown in the Front Panel
 
regards,
KM
0 Kudos
Message 3 of 14
(4,024 Views)
You didn't include any of the subVIs this calls.  It looks like they do the bulk of the processing for the tables.

If it works fine for a few hours then bigs down, have you verified there is no memory leak in your application?  50k of data isn't that much, although depending on what you do with it for display could significantly increase the size of the eventual data.
Message 4 of 14
(4,014 Views)
when you are stuffing the data in the queues, do you continually open the queue (by name)?

Paul
Message 5 of 14
(4,014 Views)

Paul and Matts comments are valid but I would also like to add what we have found regarding tables.

Defer FP updates and hiding the table (visable = F) both help with table update speed.

Background colors changes are a disaster and should be avoided.

We were never completely satisfied with anything we could do using the table control as-is and resorted to only showing the portion of the table that was visable, and implementing our own scroll bars to control what was visable.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 14
(3,980 Views)
Ben's suggestion about defering Front Panel updates is a biggie, especially when changing cell or text colors.  You can siginificantly reduce the amount of time it takes to run that code by turning off front panel updates, performing your color changes and then turning front panel updates back on.
Message 7 of 14
(3,964 Views)

Thanks everyone for the suggestions.  i have tried everything that's mentioned in this post. I am unable to improve the performance of the system.  I have also observed from Task manager that the Winlogon.exe takes up about 40-50% of CPU usage.  Could that be the culprit?  Any more suggestions?

Thank you.

Regards,

km

0 Kudos
Message 8 of 14
(3,922 Views)
Is winlogon.exe pretty constant about using up a lot of cpu time? Since that can be a sign of a virus or trojan (or something benign in windows being unhappy). Just google "winlogon cpu usage", if you want to try figuring out what's causing it.

Matt W
0 Kudos
Message 9 of 14
(3,891 Views)
I think Matt W has a good suggestion about looking into why winlogon is using so much processor power.  The thing to look for is whether LabVIEW affects how much processor power is used by winlogon.  Some research on the net shows that that exe can be hijacked by viruses so I would recommend checking into that as well.
Eric A.
National Instruments
Distributed I/O Product Support Engineer
0 Kudos
Message 10 of 14
(3,870 Views)