Rule # 1
remember who your customer is, maintenance !
plc code that only the programmer can understand isn't a program, its worthless.
a machine can cost $10 million and is not worth 10 cents if maintenance cannot understand the code and trouble shoot the problem. maintenance will give up trying to fix the issue and when asked by their boss they will tell him that they cannot understand the logic no matter how long they try.
So management hears about the downtime, your boss hears about the problem, and you hear about the problem.. you then spend the next week, month, year writing the code so maintenance can understand what's going on.
in the meantime, you get a bad reputation, your company may loose a very valuable customer in the long run.
LONG story short, find out what the maintenance guys know and understand, talk to them and let them know what's going on, get them involved
DO TRAINING !!
Rule #2
DOCUMENTATION !!!
good manuals with a sequence of events in the automatic cycle, cad drawings that are correct with the machine modifications made (mechanical, electrical, pneumatic / hydraulic), bill of materials.
PLC program that has good rung comments every 5 rungs or so.
#3
only have (1) debug bit that is always on and only (1) that is always off.
document them at the beginning of the program.
#4
as already stated, break up the program.
a multistation machine can be broken up into individual station programs.
#5
only use (1) latch and (1) unlatch bit not multiple latches of the same bit.
#6.
get a good understanding of the machine operations and write it down.
get the customer to approve the document, then write the code in the order of the machine sequence.
#7
Change orders happen - have all program changes documented and signed by the one requesting the change, even if it's a 10 minute fix !! that document saved my rear and the company I worked for and kept us out of a multimillion dollar lawsuit.
#8
multistation machines that do the same thing must be programmed identically using different bits. not 6 different ways.
for example, a 6 station machine using slc 500.
station 1 - b13,t14,c15,....
station 6 - b63,t64,c65....
same logic, different bits.
#9
you have 2 numbers, a and b
a > b
a = b
a < b
always program that logic. a co worker years ago NEVER programmed a = b
#10 have a good attitude with your customer, you may be asked to never return, it does happen !
same co worker mentioned above, plant manager told the boss to never send him there or touch his machines again.
#11 never forget, you can be replaced.
#12 Always make sure the machine is cleared of all tools and workers when downloading the program, going to run mode, applying plant air for the first time, or making online program changes !
#13 if you can ask what if this happens and you don't have an answer, plan for it!
#14 the program in the plc is he master, don't assume you have the correct copy on your pc. Make a backup of your pc program, upload the program to your pc and make a copy.
keep lots of backups so you can go back to your starting point if necessary.
#15 don't forget about BUBBA ! he loves to change things and never tell you or anyone else what he did
lots of other stuff that can be added by others.
james