Understanding different programming techniques
In our previous articles, we looked at PLC systems and what they are, as well as their interface requirements. Now we’re going to look at the different programming techniques we can use in a PLC system.
PLC programming
A PLC program is a set of instructions representing the logic that governs the process the PLC is controlling. There are two main classifications of PLC programming languages. These can be divided into sub-classifications:
- Textual Language
- Instruction list
- Structured text
- Graphical Form
- Ladder Diagrams (LD) (i.e. Ladder Logic)
- Function Block Diagram (FBD)
- Sequential Function Chart (SFC)
While all of these can be used, graphical languages are generally preferable. We’re going to look at some of these languages now.
Ladder Logic
This is the simplest form of PLC programming. It’s also known as ‘relay logic’. The relay contacts used in relay controlled systems are represented using ladder logic. The image below shows a simple example of a ladder diagram:
In this example, two pushbuttons are used to control the same lamp load. When any one of the switches is closed, the lamp will glow. The two horizontal lines are called rungs and the two vertical lines are called rails.
Every rung forms the electrical connectivity between Positive rail (P) and Negative rail (N). This allows the current to flow between input and output devices
Functional Block Diagrams
A Functional Block Diagram (FBD) is a simple graphical method to program multiple functions in a PLC. A function block is a program instruction unit that yields one or more output values when executed.

It’s represented as a rectangular block with inputs entering on the left, and outputs leaving on the right. It shows a relationship between the state of the input and output.
The advantage of using FBD is that any number of inputs and outputs can be used on the functional block. When using multiple input and outputs, you can connect the output of one function block to the input of another.

The figure below shows a ladder diagram and its function block equivalent in Siemens notation.

Structured Text Programming
This is a programming language that uses statements to determine what to execute. It follows more conventional programming protocols but it is not case sensitive. A series of statements (logic) consists of expressing assignments and relationships using several operators. The structure’s text operators are listed in the image.
Many early PLCs were not capable of graphical representation of the logic, so it was instead represented as a series of logical expressions in a Boolean format
As programming terminals evolved, it became more common for ladder logic to be used because it was a familiar format used for electro-mechanical control panels. More modern formats, such as state logic and Function Block diagrams, exist, but they are still not as popular as ladder logic. A possible reason for this is that programmers prefer the more visual appeal of ladder logic over structured text programming.
Until approximately the mid-1990s, PLCs were programmed using proprietary programming panels or special-purpose programming terminals, which often had dedicated function keys representing the various logical elements of PLC programs. Some proprietary programming terminals displayed the elements of PLC programs as graphic symbols, but plain ASCII code representations of contacts, coils, and wires were common.
Keep an eye out for our next articles, where we’re going to dive even further into Programmable Logic Controller systems and their uses.
Interested in our courses?
You can read more about our selection of accredited online electrical and electronic engineering courses here.
Check out individual courses pages below:
Diploma in Electrical and Electronic Engineering
Higher International Certificate in Electrical and Electronic Engineering
Diploma in Electrical Technology
Diploma in Renewable Energy (Electrical)
Higher International Diploma in Electrical and Electronic Engineering
Alternatively, you can view all our online engineering courses here.
Recent Posts
Starting Your Engineering Journey: The Higher International Certificate (Level 4)
Starting Your Engineering Journey: The Higher International Certificate (Level 4) Embarking on a career in engineering is a significant decision, and choosing the right starting point can make all the difference. The Higher International Certificate (HIC) from iLearn Engineering® offers a flexible, accessible, and globally recognised route into the profession. Whether you are beginning your […]
Understanding Qualification Levels and Credits: a guide for engineering students
Understanding Qualification Levels and Credits: a guide for engineering students 1. Introduction to Qualification Levels 2. What Are Credits and Why Do They Matter? While 120 credits is broadly equivalent to one academic year, in traditional university settings this would usually be delivered across approximately 39 weeks with fixed timetables. In contrast, asynchronous learning models—such […]
What is Inertia and how to Calculate it ?
What is Inertia and how to Calculate it ? Inertia is the property of matter that causes it to resist changes in its velocity. This includes changes to the object’s speed or direction of motion. Inertia is directly related to mass, the greater the mass, the greater the inertia. In simple terms: “An object in […]