PLC programming languages

Snayush
6 min readJun 27, 2022

--

Today in this blog, we are going to see different types of PLC programming languages. What are the most common PLC programming languages that often used most among the programmers?

Five different types of PLC Programming Languages

There are five types of PLC Programming languages all are part of IEC(International Electrotechnical Commission) 61131–3 International Standard. According to this standard, the five types of different PLC Programming Languages are:

1.Ladder Diagram (LD)

2.Function Block Diagram (FBD)

3.Structured Text (ST)

4.Instruction List (IL)

5.Sequential Function Chart (SFC)

These are all the five different types of PLC programming languages but among all of them, Ladder Diagram (LD) is the most popular PLC programming language.

Different Types of PLC Programming Languages

Let’s see all these languages in detail one by one.

1) Ladder Diagram (LD)

A ladder diagram is usually called a “Ladder Logic”, this represents a program by a graphical diagram.

This looks like relay racks, each device in the relay rack would be represented by a symbol on the ladder diagram.

The name ladder diagram is based on the programming language pattern similar to a ladder, with two vertical rails that shows electrical connection among a series of horizontal rungs between them.

Advantages of Ladder Diagram (LD):

· Easy to learn, understand and follow

· More reliable than electronic circuit controller

· A most convenient way to represent the discrete logic

· Easy to fault diagnose

2) Function Block Diagram (FBD)

Function Block Diagram (FBD) is another PLC programming language that is a popular one and looks like a graphical type like a Ladder Diagram (LD).

In Function Block Diagram inputs and outputs are connected in blocks by connection lines.

Function blocks are mainly used to do repetitive tasks like starters, closed-loop control, PID loops, etc.

Advantages of Function Block Diagram (FBD):

· Easier because of a graphical representation method

· One block consists of several lines of logic which is like a repetitive task

3) Structured Text (ST)

The ST or STX is the short abbreviation of Structured Text, one of the PLC programming languages. It is a high-level programming language is like a ‘C’ or ‘Pascal’.

The ST consists of various statements with complex statements and instructions like IF, WHILE, CASE, RETURN, FOR, REPEAT, etc.

It is a very powerful language that can easily execute complex mathematical logic.

Advantages of Structured Text (ST):

· Very good with complex algorithms and mathematical logic.

· Easy to modify programming due to standard coding format.

4) Instruction List (IL)

Instruction List (IL) is one of the PLC programming languages which is like an assembly programming language. You will find the series of instruction lists in this language.

The mnemonic codes like LD, AND, OR, A, etc. are used in this PLC programming language. Sometimes it is easy to remember the code while using this programming language.

Advantages of Instruction List (IL):

· High Execution Speed.

· Less Memory Consumption as compared to other PLC programming languages.

5) Sequential Function Chart (SFC)

Sequential Function Chart (SFC) is also a graphical programming language that is like a flow chart like logic.

In this PLC programming language, the program is divided into steps that act as a major role.

Steps consist of an action that occurs when a programmer wants them to happen. Steps can be active or inactive.

Transitions are the instructions that are used to move the program from one step to another.

Advantages of Sequential Function Chart (SFC)

· Easy to understand overall program control.

· Easy to design and modify logic due to repeated instructions.

How to choose which PLC programming language to learn?

The answer to this question is going to depend on a couple of things:

1. What language your workplace or lab uses currently.

2. The application you’re designing.

3. The PLC brand you have, and the software packages you have access to; and

4. Your career scenario.

Let’s look at each of these points in more depth.

1. What PLC language your workplace uses

à Typically, if you work in a factory or in a lab with PLCs, there’s already a universal language that everyone is expected to use. Most of the time it’s Ladder Diagram, regardless of the application. If you’re getting into PLCs because your job demands it, I highly recommend figuring out what language(s) the equipment uses already and then becoming familiar with those first. It doesn’t make sense to learn ST if all of your machines run LD.

2. The Automation Application you’re designing

à Secondly, if you work for an Automation, a Systems, or a Machine Integrator, you might be required to know all five IEC 61131–3 languages and choose the best one based on the customer’s application. As mentioned above, each of the PLC programming languages has its advantages and disadvantages depending on what you’re trying to do. Some customers might require that their machine is written in a certain PLC programming language so that their maintenance staff can debug and maintain the equipment after it’s installed. It’s a good idea to check with the contract requirements to ensure that you’re writing the code in the correct language.

3. The PLC brand you’re using

à Lastly, if you’ll want to figure out what PLC you’re using and what language(s) it supports. Some PLCs only play nice with Ladder Diagram. Some PLCs and PACs support all five IEC 61131–3 languages. Even if your controller supports the language, you’ll want to make sure that your programming software has the capability to write that language. Ladder Diagram is a default option, the majority of the time. Some brands require add-on packs for using additional languages. Consult with the software and your brand’s documentation to figure out which language is best suited for your system.

4. Your Career Path

Furthermore, if none of those points are applicable to you because you’re just trying to advance (or start) your PLC programming career, then I recommend learning the most popular PLC languages (LD, FBD, ST) and then working your way through Instruction List and Sequential Function Chart. You don’t need to be a master at every PLC language. If you know LD very well, then you’ll be ready to tackle about 80% of the automation projects out there today. It’s more about having a solid foundation in how to develop an automated system. Translating it into a different language is secondary, so long as you understand at least one language very well.

Places to Learn PLC Programming

There are a bunch of resources to learn PLC programming including vendor training, online courses, and YouTube. Vendor training can be thousands of dollars, so if you’re looking to fund your own PLC development plan, I recommend a few Udemy Courses to get you started

Final Thoughts

This is all the basic information about different types of PLC programming languages. So, which is the best PLC programming language as per your opinion? Let me know in the comment section.

As per most of the programmers and users of PLC, Ladder Diagram is the most popular and used PLC programming language due to its easy understanding and similarity to relay logic.

Please let me know your experience with the different types of PLC programming languages and share your opinion about PLC programming.

--

--