PLC Programming Language (Ladder VS Structured Text)


IEC 61131-3:2013 or The International Standard for PLC programming defines the following language for PLC programming.


  • Ladder Diagram (LD)
  • Structured text (ST)
  • Instruction List (IL)
  • Function Block Diagram (FBD)
  • Sequential Function Chart (SFC)

On this article the only language that I will discuss are Ladder diagram and Structured text including thier advantages and disadvantages.

The picture below Shows the result of my poll on YouTube (View other YouTube poll)

Date:10-2-2019



Ladder VS Structured Text (Structure)

In terms of Structure, Ladder Diagram is composed of symbols with equivalent function while Structured text is composed of Text Instructions which is look like C#, C++ etch.


Ladder VS Structured Text (advantages and disadvantages)

Ladder Diagram is easier to understand than Structured Text because it composed of drawings compare to Structured text. If you have a strong background in electrical diagrams it is easier to understand the ladder diagram.




Example 1:



The picture below shows that if I0.00 is "ON" Q0.00 will turn "ON" and if I0.00 is "OFF" Q0.00 will turn "OFF", on this particular example ladder diagram is easier to understand and structured text easy to understand also but if you are not familiar will C#, C++ and other developer software you might be a little confuse on using "==" and "=".


Example 2:

The picture below shows that if I0.00 is "ON" Q0.00 will turn "ON" and if I0.01 is "ON" Q0.00 will turn "OFF", on this example if you don't have a strong electrical background you might be a little confuse on ladder diagram but the electrical knowledge that you need to catch up is not that huge to understand it, on the other hand Structured text is easy to understand if you have a strong background on computer developer software. 


Example 3:

On the picture below you will see the real advantage of using Structured text instead of ladder diagram, as you notice ladder diagram consumes a lot of symbols and you will take more time to analyze the program compare to Structured text.


Ladder VS Structured Text (Brand)

In terms of PLC brand I can say that becoming an expert in ladder diagram is better than becoming an expert in Structured text because in ladder diagram the structure of all brands are almost the same compared to the structure of  Structured text. see picture below.


It is difficult to use Structured text when we are dealing with different brands of PLC because each brand has a unique syntax while in ladder different brand has different symbols, but using the function of each symbol is not that difficult because you just need to click the symbols to use it unlike the structured text there is a high chance of typographical error. see picture below


Notes:

  • If you are dealing with only one brand of PLC, structured text is better to use because it consumes less space on computer screen compared to ladder, and it is easier to program when we are dealing with mathematical formula.
  • if you are dealing with different PLC brands, Ladder diagram is better to use because you are not prone on typographical error and it is more presentable and easier to explain to another person. The program simulation is also easy to understand because of the animation.

No comments:

Post a Comment