Structured Text vs. Instruction List for PLC Programming

In PLC, the five types of programming languages are ladder logic, structured text, functional block diagram, sequential flow chart and instruction list. Out of these, structured text and instruction list are the ones with statement syntax. They look somewhat similar to a proper IT language. But, they have their own style and syntaxes which makes it unique for use.

Though ST is the most famous and used one when compared with IL, IL is still used somewhat in smaller applications and assembly level programming applications. In this post, we will see the difference between structured text and instruction list programming languages.

What is structured text language?

Structured text (STL) is a language whose syntax is comparable to C, Pascal, and C++. So, it is considered as one of the most high level languages in PLC programming.

When you want to do complex calculations or consider many ifs and buts, this is the most preferred language. It is very easy for troubleshooting for such types of applications and also saves time in writing code. The STL language consists of operators, assignments, statements, and expressions.

What is structured text language?

Refer to the above image. Every statement must end with a semicolon. The read and write expressions are separated by a syntax – :=. The variable or expression which is to be read will come to it’s right side and the variable or expression which is to be written will come to it’s left side. := is called an assignment operator. It is this operator which separates the read and write syntaxes.

You can write many types of popular STL functions like if-else, for-while, do-while, case, etc. As per the below PLC STL example, the lamp is the variable which will be written and the two variables – start and stop, will be the ones whose values will be read for writing.

What is structured text language?

What is an instruction list language?

Instruction list is a language whose syntax is equal to assembly language programming. It is not as popular as ST language, due to complex coding and somewhat difficulty in quickly troubleshooting.

IL is considered a low-level programming language. Nowadays, new PLCs and software mostly do not implement this language in them. But, as its syntax is somewhat similar to ST language, that’s why I considered it for comparison.

What is an instruction list language?

Refer to the first image above. IL language comprises a sequence of instructions. This means, if you see the ST language example above, then everything was finished off in one line. But here, you have to write one variable in a single line. Only one variable is allowed in a single line with it’s corresponding action like AND, NOT, etc.

So, the PLC program looks bulky and difficult to troubleshoot. We have used the same above example as IL language. As you can see, it consists of operands like LD, ANDN, and ST. It has its own meaning and you can see the second image for more understanding.

PLC instruction list language

Difference between ST and IL languages

In ST language, you can write multiple variables and expressions in a single line, but this is not possible in IL language, as it allows only one variable with it’s action in a single line.

The program is easier to troubleshoot in ST language than IL language.

Program size is bulky to look at in IL language than ST language.

ST statement ends with a semicolon, but there is no such thing in IL language. There is not a strict compulsory to use characters like colon or semicolon in IL language. You just have to remember and refer to proper mnemonics in IL language as shown in above figure.

ST is a high-level language whereas IL is a low-level language.

ST is highly preferred for complex algorithms and codes, which you cannot use with IL language, otherwise programming becomes difficult to troubleshoot.

Comparison

Structured Text (ST)Instruction List (IL)
Structured Text is a High-level language similar to programming languages like Pascal, C, JavaInstruction List is a Low-level language similar to assembly language
Structured Text is easier to readInstruction List is more difficult to read
Structured Text can handles complex algorithms and calculations easilyInstruction List is best for simple tasks and difficult for complex logics
Structured Text is easier for programmers familiar with high-level languagesInstruction List is easier for those familiar with assembly-level programming
Structured Text is easier to debug with better clarity in codeInstruction List can be harder to debug due to lack of structure and simplicity
Structured Text is suitable for large, complex, and mathematical operationsInstruction List is suitable for small and simple operations
Structured Text is mainly used for complex control logic and calculationsInstruction List is mainly used for simple repetitive tasks and small applications only

In this way, we saw the difference between structured text and instruction list languages

Read Next:

Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address

Leave a Comment

Share via
Follow us and never miss an update!