Compiling Ladder Diagram into Instruction List to comply with IEC 61131-3
The standard IEC 61131-3 defines four programming languages for PLC, and the Ladder Diagram is the most predominant one among them. As the ladder Diagram is a graphical language and cannot be directly executed by general PLC processor, most commercial PLC programming systems, e.g. SIEMENS S7, MITSUBISHI Gx Developer, OMRON Gx Programmer, use Instruction List as intermediate language between the Ladder Diagram and the machine instructions of the processor. However, the Instruction List generated by these programming systems fails to comply with IEC 61131-3. In this paper, we present a method to compile a Ladder Diagram into an Instruction List that fully complies with IEC 61131-3. Several unclear aspects of the standard in compilation, such as the use of EN and ENO, the evaluation of EN, multiple coils and topology restrictions, are discussed before the method is presented. The mathematical definition of Two Terminal Series Parallel unidigraphs is proposed for the first time to represent the Ladder Diagram networks that are composed of connections in series and parallel. Based on the property of TTSP, a method is suggested to verify the topology of the Ladder Diagram. Finally, a complex compilation example shows that the proposed method is correct and has the advantages of ease of understanding, modification, and maintenance. (C) 2009 Elsevier B.V. All rights reserved.
algorithm iec 61131-3 standard instruction list (il) ladder diagram (ld) programmable logic controllers (plc)