What Makes a Good PLC Program?

PLC programmers have been faced with a steepexactly where the fault was, the drive was
learning curve over the last 25 years, asreplaced and production resumed within half an
technologies have moved quickly and almost allhour. Think information and look at what can hang
industries have implemented programmable logicup the operation.
controllers as a standard. This means that goodOne good technique I have found on making code
experienced programmers are hard to find, andmore robust is sequential counts; I have spent the
while most companies offer programminglast 5 years developing my own ladder sequential
services there are important features which arecharts. After working with manufacturers own
often missed out.add -on packages ,at a premium, my opinion is
Firstly a PLC programmer should write code soladder steps are more cost effective and usable.
that it can be easily understood. DocumentationDocumentation - As a minimum every PLC code
and structure are essential. This often involves ashould include as a minimum an Operand
working knowledge of the plant or process, acomment, whether this is an input output or
good PLC should be able to solve engineeringinternal register. In my project I will also always
problems from a specification, not just producetry to cross reference this with the electrical
lines of code. From my experience the best PLCdrawing. Block Comment the first block in a PLC
programmers are always firstly engineers.code should include important traceability
Secondly the end user should never need to lookinformation, a comment of any modifications the
at the PLC programmer's code this might seem adate and reasons should be quickly visible. Rung
contradiction of point one but a good program willcomment all rungs should give a functional
perform without intervention. I work on thedescription of what they are doing.
theory if something looks rushed and untidy itStructure - Structure should always follow the
usually is.flow of the machine, for example a packaging
Thirdly think robustness this means if a machinemachine should start a infeed, define each
or process stops the operator/technician shouldoperation in a separate routine and end with the
know why straight away, diagnosing softwareout feed. This technique seems to have been
faults should not require a specialist. With themissed by many programmers making diagnosis
implementation of field busses and integratedand modification difficult.
devices this becomes increasingly difficult asIt should never be underestimated how much
programmers often adopt the Idea of it worksmachine/process availability can be increased
leave it, upon the first failure nobody can everthrough good programming techniques.
diagnose the issue. When using new technologiesRemember PLC programming is not a black art,
time should be spent looking at the functionality. Injust because something is not visible does not
a recent project I managed to mimic the entiremean it should not be done correctly. Always
Profibus network with over 50 drives into thedemand more from systems integrators and PLC
SCADA, two days later a drive faulted and anprogrammers.
operator was able to show the maintenance guy