Introduction to IEC61131-3 programming languages
IEC 61131-3 is set to standardize programming languages for industrial automation that is independent of any platform brand or automation vendor
IEC 61131-3 is the third part of the IEC 61131 family which consists of nine parts as follows:
- Part 1: General Overview
- Part 2 Equipment Requirements & Tests
- Part 3 Programming Languages
- Part 4 User Guidelines
- Part 5 Communications
- Part 6 Functional Safety
- Part 7 Fuzzy Control Programming
- Part 8 Application Guidelines
- Part 9 Communication Interface
IEC 61131-3 defines five programming languages for industrial automation:
- Ladder Diagram (LD)
- Function Block Diagram (FBD)
- Structured text (ST)
- Instruction List (IL)
- Sequential Function Chart (SFC)
Even though ladder diagram (LD) was initially developed for programmable logic controllers (PLC) and Function block diagram (FBD) was originally developed for distributed control system (DCS), a PLC is no longer limited to Ladder Diagram (LD) and DCS is not limited to function block diagram (FBD). The five programming languages can be found in both programmable logic controllers (PLC) and distributed control systems (DCS).
Ladder Diagram (LD)
The Ladder diagram (LD) has its origin back to the early sixties of the nineteenth century with the birth of the programmable logic controller (PLC).
The ladder diagram is set to replace the relay logic. Therefore, ladder diagram was designed to closely resemble the wiring diagram documentation for relay logic.
More details are available here
More details are available here
Function block diagram (FBD)
The function block diagram (FBD) is a set of interconnected blocks displaying the flow of signals between blocks. It is similar to a ladder logic diagram, except that function blocks replace contact and coils are the output of function blocks.
More details are available here
Structured text (ST)
The Structured Text (ST) language defined by IEC 61131-3 is a high-level language
whose syntax is similar to Pascal. In general, ST is useful for implementing calculation intensive functions and other functions that are difficult to implement in the other languages. The ST language has a complete set of constructs to handle variable assignment, conditional statements, iteration, and function block calling.
More details are available here
whose syntax is similar to Pascal. In general, ST is useful for implementing calculation intensive functions and other functions that are difficult to implement in the other languages. The ST language has a complete set of constructs to handle variable assignment, conditional statements, iteration, and function block calling.
More details are available here
Instruction list (IL)
The Instruction List (IL) language is a low-level language comparable to the assembly language programming of microprocessors.The IL language has a set of instructions to handle variable assignment, conditional statements, simple arithmetic, and function block calling.
The IL and ST languages share many of the same elements. Namely, the definition of variables and direct physical PLC addresses are identical for both languages.
More details are available here
Sequential function chart (SFC)
The Sequential Function Chart (SFC) is the basic design tool for sequential control
applications.
The IEC 61131-3 SFC language is derived from the IEC 848 function chart standard.
SFC describes graphically the sequential behavior of a control program.
More details are available here
applications.
The IEC 61131-3 SFC language is derived from the IEC 848 function chart standard.
SFC describes graphically the sequential behavior of a control program.
More details are available here
Conclusion
Mastering any of the above languages is at the first place a matter of preference or choice.
While electrical engineers tend to prefer Ladder diagram (LD), electronics engineers tend to chose function block diagram (FBD) and software engineer tend to select structured text (ST), other considerations should drive the adoption of a specific language in a specific project:
- Type of controls in a project:
- If the control type is discrete, Ladder diagram (LD) would be the suitable language to adopt. Other languages such as Function block diagram (FBD) or Structured text (ST) can still be used but Ladder Diagram (LD) implementation would be the more efficient way to program the PLC
- If the Control type is continuous, Function block diagram (FBD) or a combination of Function block diagram (FBD) and Ladder diagram (LD) can be used.
- For Batch control, the easiest way is to program the PLC using Sequential function chart (SFC). However, Ladder diagram (LD) or Function block diagram (FBD) can still be used specially if the used PLC series does not support SFC however, it will require more effort and additional codes to implement the required sequencing of the batch process.
- Structured text (ST) programming will find its benefit whenever you have mathematical calculation and iterative process. It is mostly used for the creation of the user defined function blocks specially the ones that requires iterations and advanced mathematical calculations.
- Instruction List, being a low level languages, it is less and less used in the industry unless for some special applications which low level system interaction
- Type of PLC used:
- Not all PLCs support all the programming languages
- While Ladder Diagram (LD) is the languages that is found in almost all PLC series and ranges, you might find some PLCs that do not support Function block diagram (FBD) or Sequential function Chart (SFC).
Comments
Post a Comment