MachineBuilding
px

PLCopen releases first coding guidelines for PLC programming

13 October 2016

PLCopenvisit website

 

PLCopen releases first coding guidelines for PLC programmingPLCopen has released the first set of PLC programming guidelines with the aim of improving code quality, reducing development time and costs, and making the code easier to maintain. In other words, adhering to the guidelines will benefit both the programmer and the end user.

Industrial automation has changed drastically over the past century. From the 'Charlie Chaplin' style factories, where companies were reliant on people to manage the factory floor, to today, where factories are highly automated with only a few people present on the production lines. As a result of this greater reliance on machines, software is becoming increasingly responsible, complex and demanding. This does not come without its challenges. Due to the greater complexity, programs are more difficult to maintain, more time-consuming and potentially more expensive. This is why quality is taking such an important role these days.

Unlike in other industries, such as that of embedded software and computer science, there has not previously been a dedicated standard for Programmable Logic Controller (PLC) programs. This has meant that programs were not measured against anything and were often of a poor quality. But that is where the independent association PLCopen has come in and set the standard with the release of its coding guidelines. These guidelines are a set of good practice programming rules for PLCs, which will help to control and enhance programming methods within industrial automation.

PLCopen, whose mission is to provide industrial control programming solutions, collaborated with members from a number of companies in different industries to create these coding guidelines. These companies include PLC vendors such as Phoenix Systems, Siemens and Omron, to software vendors such as Itris Automation and CoDeSys, and educational institutions such as RWTH Aachen. These guidelines were inspired by some pre-existing standards from other domains such as IEC 61131-3, JSF++ coding standard and MISRA-C, and they are the product of three years of work by the working group. PLCopen's reference standard can be used for testing the quality of all PLC codes, independent of brand and industry.

Benefits

PLCopen's coding guidelines comprise 64 rules covering the naming, comments and structure of the code. By following these guidelines, the quality of the code will be improved and there will be greater consistency among 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 functional safety standard IEC 61508 which, in 2011, was also extended to PLCs. However, quality is becoming an ever more important factor across the board as programs become bigger and more complex, so 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 greatly improve the quality of the code and, as a result, help companies save time and money. The introduction of such a standard will enable 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, with PLCopen now being the de facto standard in the automation industry.

With quality playing a greater role in industry and with companies always looking for cost savings, the answer is to use some sort of standard or set of rules in order to meet these goals. PLCopen has created this standard to improve quality and consistency across PLC programs and so that individual industries and companies do not have to go to the effort of creating a set of rules themselves. In addition to the internal benefits, this standard will also enable companies to enforce their quality requirements on suppliers, software contractors and system integrators. The only issue for now is that the process for verifying these rules is done manually by most users as they are unaware that some tools are available to do this automatically. But, overall, following a standard such as the one proposed by PLCopen will greatly improve the quality of the program and will save time and money throughout the whole duration of the product lifecycle.

The PLCopen coding guidelines v1.0 are available to download for free from the PLCopen website www.plcopen.org.

PLCopen will be present at SPS IPC Drives 2016 in Nuremberg from 22-24 November to answer any questions or for further information.

 
© Copyright 2006-14 Damte Ltd.