From the factories of the past, heavily reliant on people to manage the factory floor, to today’s highly automated, autonomous plants, industrial controls and technology have changed the way production lines roll. Because of machines’ greater role, software is becoming increasingly responsible, complex and demanding, but this doesn’t come without its challenges.
With greater complexity comes increased maintenance and expense. Programming quality therefore becoming increasingly important.
However, programmable logic controller (PLC) programs have never had a dedicated standard, so programming has never been measured against anything and its quality can be poor because of this lack of context and guidance. But the independent association, PLCopen has now released its standard for coding guidelines — a set of good-practice programming rules for PLCs, designed to help to control and enhance programming methods within industrial automation. The PLCopen coding guidelines v1.0 are available to download for free at www.plcopen.org.
PLCopen, whose mission is to provide industrial control programming solutions, collaborated with members from a number of organizations in different industries to create these coding guidelines. These organizations include PLC vendors, software vendors and educational institutions, and the guidelines were inspired by some pre-existing standards from other domains such as IEC 61131-3, JSF++ coding standard and MISRA-C. They are the product of three years of effort from the working group. And PLCopen’s reference standard can be used for testing the quality of all PLC codes, independent of brand and industry.
PLCopen’s coding guidelines are made up of 64 rules, which cover the naming, comments and structure of the code. These guidelines have been created to improve the quality of the code and deliver greater consistency amongst developers. This will result in greater efficiency, as better readability means a faster debug time and a program that is easier to maintain. This then results in lower costs as less time is required in order to maintain the program, and the maintenance should be easy enough for both an internal or external programmer as the code will be more straightforward. If the original developer fails to follow certain guidelines when creating a program, this could obstruct other developers and maintenance teams when working with the code during the product lifecycle, thus creating delays and additional costs.
In safety-critical industries, there is the standard IEC 61508, which in 2011 was also extended to PLCs. However, as quality is becoming a more important factor across the board and programs become bigger and more complex, it is generally good practice to follow a set of rules or a standard in all industries. PLCopen’s coding guidelines suggest a standard that can be used across all industries to improve the quality of the code and, as a result, help companies to save time and money. The introduction of such a standard will allow PLC programs to be verified not only from the simple functionality perspective, but also from a coding perspective by confirming that good practice programming rules have been followed in their creation. Consistency across PLC programs can only be achieved through the respect of a global corporate or industrial standard.
PLCopen has created its standard to improve quality and consistency across PLC programs. This standard will also allow companies to enforce their quality requirements on suppliers, software contractors and system integrators.
PLCopen will be present at SPS IPC Drives 2016 in Nuremberg, Germany, Nov. 22-24.