IEC 61131-3 compiler
This project has the goal of producing an open source compiler for the programming languages defined in the IEC 61131-3 standard. These programming languages are mostly used in the industrial automation domain, to program PLCs (Programmable Logic Controllers).
This standard defines 5 programming languages: - IL : Instructtion List A textual programming language, somewhat similar to assembly. - ST : Structured Text A textual programming language, somewhat similar to Pascal. - FBD: Function Block Diagram A graphical programming language, somewhat similar to an electrical circuit diagram based on small scale integration ICs (Integrated Circuits) (counters, AND/OR/XOR/... logic gates, timers, ...). - LD : Ladder Diagram A graphical programming language, somewhat similar to an electrical circuit diagram based on relays (used for basic cabled logic controllers). - SFC: Sequential Function Chart A graphical programming language, that defines a state machine, based largely on Grafcet. (may also be expressed in textual format).
Of the above 5 languages, the standard defines textual representations for IL, ST and SFC.
It is these 3 languages that we target, and we currently support all three, as long as they are expressed in the textual format as defined in the standard.
Currently the matiec project generates two compilers (more correctly, code translaters, but we like
to call them compilers :-O ): iec2c, and iec2iec
Both compilers accept the same input: a text file with ST, IL and/or SFC code.
The iec2c compiler generates ANSI C code which is equivalent to the IEC 61131-3 code expressed in the input file.
The iec2iec compiler generates IEC61131-3 code which is equivalent to the IEC 61131-3 code expressed in the input file.
This last compiler should generate and output file which should be almost identical to the input file (some formating may change, as well as the case of letters, etc.). This 'compiler' is mostly used by the matiec project contributors to help debug the lexical and syntax portions of the compilers.
|License||Verified by||Verified on||Notes|
Leaders and contributors
|Mario de Sousa||developer|
Resources and communication
|developers||VCS Repository Webview||https://bitbucket.org/mjsousa/matiec|
|Required to build||flex|
|Required to build||bison|
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.
The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.