LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cpu usage at 100%

I have been doing LV code for about 10 years now.

I have writen and maintained code developed by myself and others.

I do this for a living and am contracted by my customers who pay me by the hour.

If a customer came to me with this code, I would warn them first about the risk of trying to proceed with the code as is.

It would probably be cheaper for me to re-write it correctly than to try and "remodel a house of cards".

It looks like a variation on a producer consumer with a couple of AE's would do the same thing but would be much easier to understand and maintain. Not to mention there would probably be a lot of CPU left over.

Qs:

Did this ever work?

Ben

Message Edited by Ben on 10-24-2007 11:15 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 18
(1,474 Views)

Ben:

You sound aggrevated and mad; and I didn't mean for that to happen. We are an R&D facility; and as such, projects often take a lengthy amount of time to implement. The machine was originally stand-alone and ran reaction batches that were short in duration. Recently, it was decided to link the PC to the company server. When that happened, AMIGO, along with virus scanning software and other things, were loaded onto the PC. It is possible that, while not optimally, the project did work for a while. With the background software running and the need to run 8 hour plus reactions, it is no longer getting the job done.

0 Kudos
Message 12 of 18
(1,467 Views)

No not mad.

I was simply trying to be brutely honest.

Q:

How does your memory useage look?

Look at task manager >>> performance

If you are using more virtual memory than you have physical, more memory may be an adequit band-aid.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 18
(1,455 Views)
Ben is just stating the ugly truth.  The way the code is written, it is very difficult to debug and maintain.  I would agree with Ben that if I walked into a customer and they showed me this, I would probably suggest rewriting from the ground up.

One of your big issues is that you have made the entire program sequential.  There are numerous things in your code which do not have to be done in order.  You mixed GUI updates with process code.  At first glance, it appears you're ready to do a PID update after your main frame 5, but you have to execute frames 6-9 (and all of their sub sequences) before you restart the loop again.  It doesn't look like you even need to do frames 0-2.  So, if you determine what can run in parallel, you can greatly reduce the period of your PID update.

I don't know if your approved vendor list propagates across locations, but at least one Solvay location has an Alliance member as an approved vendor.
0 Kudos
Message 14 of 18
(1,452 Views)
I had also thought about increasing memory. The PC has a 1GB RAM chip, along with a 256MB. When the project is running, with trending enabled, memory usage is around 40%. I also thought about replacing the CPU. However, it is a Pentium 4 @ 2.88GHZ. I know the program could be written more efficiently; but that general observation applies to the entire program, not just frame 7 where the trending occurs. With all of the other code inefficiencies, the program runs like a champion with trending disabled. Our approved vendor list does reach across all plants. Where do I go to find the name of the alliance partner that is already approved for Solvay?
0 Kudos
Message 15 of 18
(1,436 Views)
My shameless plug:

Advanced Instrument Technologies,  770-672-0543.  I have done work with the Alpharetta, GA Polymers Group.
0 Kudos
Message 16 of 18
(1,430 Views)
Have you timed how long the one sequence frame takes?  Since everything is sequential, if it takes several seconds to get , process, and display the trending data, it adds directly to your PID loop period.  Pulling that out to be done in parallel at a timed interval will have little to no effect on your PID loop.
0 Kudos
Message 17 of 18
(1,427 Views)
I will try to put that task in parallel. No shame in promoting your company and skills. I will check SAP to make sure you are still active as an approved vendor. It is good to know about local resources. If I can't resolve this, I would have no problem extending a PO for the needed help.
0 Kudos
Message 18 of 18
(1,423 Views)