The most common way to program early PLCs was using so-called ladder logic programming. Basically, a ladder logic diagram was a graphical way of representing the functions in a typical PLC and the control actions it would have to take. For instance, lines on a ladder logic diagram could include opening or closing a switch, turning a motor on or off, or energizing a coil on a relay. These functions would be represented graphically as rungs on a ladder, hence the name “ladder logic.”
For many years this was the standard way of programming a PLC. Even today, ladder logic programming tends to be the most favored programming language in the U.S., perhaps due mainly to its simplicity and familiarity to many in the controls industry, especially electricians and technicians.
These days, there are other programming languages for PLCs that have been standardized in the IEC 61131-3 standard. (with the 3 referring to the third part of the standard published in 2013.) This standard defines two basic types of programming languages; graphical and textual.
The standard defines 5 different languages:
- Ladder diagram – the original PLC programming language, this gives a graphical representation of circuit elements such as switches and motors.
- Function block diagram – a graphical programming language, functions are described as blocks with input and output connections.
- Sequential function chart – also a graphical programming language, good for coordinating large tasks into smaller processes.
- Structured text – a textual programming language, it is based on Pascal, a higher level language, and can communicate with other languages based on common structural elements.
- Instruction list – a textual language, it is a low-level programming language that closely resembles assembly.
In large measure, the programming language used depends on the PLC manufacturer. The most common language continues to be ladder logic with sequential function charts also fairly popular. Also, keep in mind that not all PLCs may be capable of running the various IEC languages due to lack of memory or processor speed.
The natural tendency for many engineers is to stick with a programming language that they already know and are familiar with. However, this will depend, again, on which company’s PLC is being used and which programming language it uses.
Filed Under: Motion Control Tips