Code Reviews

Join Date
Apr 2002
Location
Burlington, Ontario
Posts
186
Just a curious...

For those of you who are an integrator or design houses, do your clients ever want to do a code review or see sample code to help make there desision on wheather to buy your product or have you engineer something from there functional spec??? Do they have a specific way they want the code written, say structure wise that they might ask you to follow?? Or do most of your clients just dont care. Is this something that just isnt normally done??

Thanks,

Andrew Evenson
 
I'm with an OEM but we do fully custom stuff.

I've never had a customer ask for a sample copy of code before. But we do often have them request specific tag formats, data layouts or languages inside a given platform. Methodologies aren't usually dicussed, although I have had customers outlaw multiple instance subroutine calls.

I hope this helps.
Keith
 
As a customer, I have requested sample code.
I also have a very loose format that I would like followed.
Most of my specification is on how to document.

Oh yes, I have also flat out banned jump commands.
This was after one contractor provided us with a 130 rung code with 72 jumps in it. His code only barely worked, and was nearly impossible to trouble shoot. I do occasionally allow a jump or two if I can be convinced that it is the only way the code will work.
 
I am contracted in-house to a World-Wide manufacturer right now. The man I report directly to, does have a standard, but has never been able to communicate it. I have been reviewing the code created for several pieces of equipment on the project I am associated with and have come to the conclusion that many OEM's and integrators have hacks within their ranks. And I am from an integrator. I have seen my code evolve over the years, but I can safely say, that what I see on multimillion dollar equipment submittals pales in comparison to my early work. You cannot believe the lack of discipline and logic design I am seeing on a 4 million + dollar piece of machinery.


I am currently trying to help them develop a standard to give to potential machine builders to follow. This is only to make it easier for the maintenance techs to follow. They have a hard enough time without having to fight poor logic design.

David
 
As a customer also, I can relate to davidg68124 concerns. We recently obtained a machines at about $1.6 million. The PLC5-80 had about 64K used. The programs were a nightmare. It had 950 OTL and OTU instructions! (Our EE counted them!) Every bit was commented, but they were "going the long way to grandma's house" if you know what I mean. There were latches for everything, and multiple unlatches, and bandaids on top of bandaids, covering the spaghetti flavored turds of code!

It had two IMC-S-class servo controllers and 7 axes of motion control. That programming was seriously flawed also. The guy who did it simply didn't understand multi-tasking. None of the drives were properly tuned, and the controller tuning was terrible as well. The OEM programmers spent two months debugging, and left it for me to deal with. Four hours after they left, the machine died and I could not get it to reset. It was an RIO problem, but there were no comm fault handlers...I had to build one real quick.

During an e-stop checkout, the main, 500lb carriage came crashing into the end of the frame and sent pieces flying everywhere! We found that in GML, they weren't even watching for an E-stop condition during any motion...A lot of good that does...

Basically, I had to rewrite the whole skeleton of the code, and saved very little of it.

We have not established standards for our suppliers to follow. We have specified certain types of logic in special situations, but we are always flexible. In most areas of our plant, if it works, then it's accepted, regardless of how hard to troubleshoot/modify it may turn out to be.
 
I have never had a costomer Ask to see code examples before I got the Job. However I have definetly been dictated to the form of which the code was writen.

In general I find that Following the costomers guidles is a very good thing. They are in place because they understand their equipent, and the maintaince required on it. Not to mention in following a variaty of different costomers standerds, I have learned a lot of realy good programming habits. You also get to see different ways of doing the same thing.

Just my 2 cents, hope it helps
 
Wow,


Okie, I can relate. This same supplier was used for a previous machine of the same type. That machine was labeled Lyo 13. The 13 was thought to be the reason behind the failures that this equipment was having, LOL. But in fact, their logic design is ****. We lost a $100k load of product with it and the company took it out of service until I could figure out what was wrong. This equipment could not run three consecutive cycles without a major problem or failure.

I have only made some modifications to the machine to better protect against some of the failures that it has had, but I have warned them that it will require an entire review and serious re-write of the logic to guarantee against any more problems. I already have a list the length of my arm that needs addressing, but the cost of downtime is enormous for it right now. Not to mention the revalidation requirements involved.

With the modifications I have made(which included several rewrites of key routines) it has now seen it longest run of production without problems. That, in my never humble opinion, is just sad. What is even worse, is that the company bought 2 more of these and the problems with them are worse. As it is, we will commission them as they are, and then I will rewrite the logic appropriately before this facility goes into production.
David
 
I have asked for examples of code, and typically do if we are using a new integrator. We used an integrator for a simple job once, the code was pathetic, to say the least. It looked as if they tried several things before they got a task to work, then left the bad code in as well. No networks were commented, and no symbols or variable descriptions were used. I now ask for sample code to assess their competence with the programming environment.
We typically do everything in house, but occasionally we get overwhelmed and need to use outside integrators.
As for standards, we have a loose standard that we use for all step-logic and conveyors.

Chris
 
Thank-You All!!

I would like to thank everyone who posted a response to my question. I have to appologize in getting back to you so late.

I posed the question to see what other companies do or if they ever do a code review or ask for sample code. We are looking to do it on an upcomming project, and I just wanted to see if we were in the norm. Guess its 50/50.

Thanks for all your time..

Andrew Evenson
 
If you want a method for PLC code validation do a search for GAMP4. this is the pharmaceutical industry standard.

The attached file is from an article on PLC validation.
 
This book I have started to read, because that is the very industry that I am working with right now.


On a sidenote, anyone have any good links to DeltaV information?


David
 

Similar Topics

Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
209
hello, I'm a student and for my final grade I have to repare a sepro robot. the only problem I have for now is that i have an error code 3...
Replies
0
Views
35
I received an email from a student with the following code attached. This is supposed to control a floodgate system, and supposed to be written...
Replies
23
Views
780
I have a machine which is undergoing upgradation. As part of the process two SEW drives are being replaced., existing Gen B with new Gen C. The...
Replies
3
Views
197
I want to set user security level based on the value of a tag in my PLC called "ActiveUser". That tag will contain the A-P code which we use for...
Replies
6
Views
214
Back
Top Bottom