There are 5 languages that are all a part of the IEC (International Electrotechnical Commission) Section 61131-3 Standard. This IEC Standard allows some ground rules that standardize PLC’s and their languages. Let’s take a deeper look into all these PLC Programming Languages.
The 5 most popular PLC Programming Languages are:
1. Ladder Diagram (LD)
2. Sequential Function Charts (SFC)
3. Function Block Diagram (FBD)
4. Structured Text (ST)
5. Instruction List (IL)
Let’s show you a little bit about each of these. I will start with Ladder Diagram which is a graphical type of PLC Programming Language.
1. Ladder Diagram (LD)
Ladder Diagram was originally modeled from relay-logic which used physical devices, such as switches and mechanical relays to control processes. Ladder Diagram utilizes internal logic to replace all, except the physical devices that need an electrical signal to activate them.
Ladder Diagram is built in the form of horizontal rungs with two vertical rails that represent the electrical connection on relay-logic schematics.
You can program all the necessary input conditions to affect the output conditions, whether logical or physical.
1-1. Ladder Diagram Advantages
The main advantages of the Ladder Diagram language are:
1. The rungs allow it to be organized and easy to follow.
2. It also lets you document comments that are readily visible.
3. It supports online editing very successfully.
1-2. Ladder Diagram Disadvantages
The main disadvantage is that there are some instructions that are not available, which might make it more difficult for programming such as motion or batching.
The next PLC Programming Language that I will talk to you about is the Sequential Function Charts which uses a graphical type of programming.
2. Sequential Function Charts (SFC)
If you have any experience with flowcharts, then this PLC Programming language will feel familiar to you. In Sequential Function Charts, you use steps and transitions to achieve your end results.
Steps act as a major function in your program. These steps house the actions that occur when you program them to happen. This decision can be based on timing, a certain phase of the process, or a physical state of an equipment.
Transitions are the instructions that you use to move from one step to another step by setting conditions of true or false.
Unlike traditional flowcharts, the Sequential Function Charts can have multiple paths. You can use branches to initiate multiple steps at one time.
2-1. Sequential Function Charts Advantages
A couple of the advantages of Sequential Function Charts are:
1. Processes can be broken into major steps that can make troubleshooting faster and easier.
2. You have direct access in the logic to see where a piece of equipment faulted.
3. It can be faster to design and write the logic due to the ability to use repeated executions of individual pieces of logic.
2-2. Sequential Function Charts Disadvantages
Even when you consider the advantages of the Sequential Function Charts, this PLC Programming Language does not always fit every application.
Now we are on to our third PLC Programming Language.
3. Function Block Diagram (FBD)
The Function Block Diagram which is also a graphical type of language. The Function Block Diagram describes a function between inputs and outputs that are connected in blocks by connection lines.
Function Blocks were originally developed to create a system that you could set up many of the common, repeatable tasks, such as counters, timers, PID Loops, etc.
You program the blocks onto sheets and then the PLC constantly scans the sheets in numerical order or is determined by connections which you program between the blocks.
3-1. Function Block Diagram Disadvantages
The code can get disorganized using this PLC Programming Language because you can place the function blocks anywhere on the sheet. This can also make it more difficult to troubleshoot.
3-2. Function Block Diagram Advantages
1. The Function Block Diagram does work well with motion controls.
2. The visual method is easier for some users.
3. The biggest advantage of Function Block Diagram is that you can take many lines of programming and put it into one or several function blocks.
4. Structured Text (ST)
The 4th PLC Programming Language is the Structured Text. This language is a textual based language.
Structured Text is a high-level language that is like Basic, Pascal and “C”.
It is a very powerful tool that can execute complex tasks utilizing algorithms and mathematical functions along with repetitive tasks.
The code uses statements that are separated by semicolons and then either inputs, outputs, or variables are changed by these statements.
You must write out each line of code and it uses functions such as FOR, WHILE, IF, ELSE, ELSEIF AND CASE.
If you have experience with Basic or C languages, this PLC Programming Language will come easier than some of the other languages.
4-1. Structured Text Advantages
Some of the advantages of Structured Text are:
1. It is very organized and good at computing large mathematical calculations.
2. It will enable you to cover some instructions that are not available in some other languages like the Ladder Diagram.
4-2. Structured Text Disadvantages
The disadvantages of the Structured Text PLC programming language are:
1. The syntax can be difficult.
2. It is hard to debug.
3. It is difficult to edit online.
5. Instruction List (IL)
I will now show you the 5th and final PLC Programming Language which is Instruction List. The Instruction List is also a textual based language.
The Instruction List language resembles Assembly Language. When you use this PLC Programming Language, you will use mnemonic codes such as LD (Load), AND, OR, etc.
The Instruction List contains instructions with each instruction on a new line with any comments you might want to annotate at the end of each line.
5-1. Instruction List Advantages
The Instruction List language is valuable for applications that need code that is compact and time critical.
5-2. Instruction List Disadvantages
The main disadvantages of this PLC Programming Language are:
1. There are few structuring possibilities with the “Goto” command being one of them.
2. There can also be many errors that are more difficult to deal with in comparison to many of the other languages that I have previously reviewed.
So, have you decided which PLC Programming Language you consider to be the most popular?
After reading many reviews and opinions and with my own experiences, the Ladder Diagram is by far the most popular PLC programing language .
The main reason for this is that the Ladder Diagram language naturally followed the technology advancement from a physical relay logic to a digital and logical one. This allowed the engineers and skilled workers to follow and troubleshoot and make that transition.
In summary, there is certainly a place for all the PLC Programming Languages that we have reviewed. Your background, experience and the application you are working with are really going to be the key to which PLC Programming Language you choose.
What’s the biggest “aha” you’re taking away from this technical conversation? How can you put that insight into action now? Tell us the comments below.
Thanks again for reading. Leave your questions and comments and we’ll chat with you soon!
Happy learning,
The RealPars Team
0 Comments