PLC Code Standards???

iansmiler

Member
Join Date
Oct 2004
Location
North America - For Now....
Posts
58
I have been asked by one of my customers: 'what standards are you using when you design your PLC code?'.... I told him 'My Own Ethically High Standards!!!' - Apparently this wasn't the answer he was looking for!!!

So my question is: What standards are out there?

I'll appreciate any and all feedback :D

Ian
 
This topic has been talked about on this site many times before. In my own experience the standards used are usually dictated by the customer. They ultimately have to live with the equipment/process after you leave. I guess it also depends on the industry your working in. Process control has different standards than machinery. I guess you first should of said "Do you have programming standards that you want me to follow?".
 
I think they wanted to hear you say that you have a plan you can describe, and give an explanation of your strategies for their application...just let them know you know what your doing by showing them your approach and a glimpse of your tools/techniques.

That question might deserve a reply like, "What standards to you prefer or require?"
 
Mil-tfd-41

Steve:

I had to Google it, but I got a good chuckle when I did.:ROFLMAO:

It holds true all to often. ;)

:geek::geek::geek::geek::geek::geek::geek::geek:

Stu....
 
I've been putting together a set of PLC code standards that apply to Siemens S7 (we almost exclusively use these).

It's only rough but here's where I'm up to...

Would love some input on it...

Note: Within this document the word 'English' excludes automatic translations from other languages. English is to mean either written English from someone to whom this is their first language, or human-translated text by a technical translator from another language.

Symbols - All addresses used within the program must have symbols. The symbol will consist of the address and then the
'comment' will explain in English the usage of the address. e.g.
Symbol Address Comment
I 0.0 I 0.0 Start button

Language - Wherever possible the software needs to be translatable into LADDER representation. If untranslatable
Statement List must be used (for instance, for indirect addressing) then sections of code will be split into logical
separate networks and the individual networks' 'comment' boxes used to explain exactly, in English, what function that
particular section of code is doing.

Every function (FC) and function block (FB) must have a symbol, a function title and pertinent titles on every network, all in English.

If the role of a particular function is not immediately clear or could be misconstrued then the function comment box must
be used to explain in a clear, concise way, in English, the role of the function.

The programmer should aim to have less than 30 networks in any function or function block. Blocks that need more than 40
networks should be logically divided in order to create more blocks of less than 40 networks.

All unconditional calls should be contained within OB 1.
Cross-Area pointers should only be used when no other programming method and the address or range of addresses that the pointer(s) can address should be clearly documented in the 'comment' box at the top of the function.

Outputs or memory areas should only be written to once during a program. Conditional calls should not be used in order to
write to the same output or memory area at different points in the program.

Datablocks should be clearly documented with all address 'name' and 'comment' boxes all being completed in English.

;-)
 

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
191
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
Hi All, I wanted some feedback/thoughts on code implementation or development across several offices. What has been your collaborative...
Replies
6
Views
407
Hi! I'm fairly new to PLCs, and a PLC I was swapping sensors for shows the error code 497 - 0x050000 on the top of the HMI when I powered it back...
Replies
6
Views
606
Back
Top Bottom