Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Your First Steps Through STL Language
Share
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Your First Steps Through STL Language

Your First Steps Through STL Language

Learn how to convert a complex ladder logic program into an STL language in the Siemens Tia portal PLC software.

Last updated: September 28, 2022 2:23 pm
Hussien Ghareb
PLC Tutorials
2 Comments
Share
7 Min Read
SHARE

Maybe you will be surprised when you know that, Ladder language is not the only used for programming of a PLC device, as the International Electrotechnical Commission IEC organization approved that.

Contents
STL Language in PLCHow to build a simple network in STL?AND, AND NOT InstructionOR, OR NOT InstructionConverting a LAD network into STL languageLAD NetworkSTL NetworkVideo Lesson

There are five types of languages that can be used to program a PLC device:

  • Ladder Logic (LAD)
  • Functional Block Diagram (FBD)
  • Sequential Functional Chart (SFC)
  • Structured Text (ST)
  • Instruction List (IL)

As you could see that the Statement List language (STL) is not one of the IEC languages, it is created especially for SIEMENS PLCs, but on the other hand, we will find that STL and IL languages are 95% identical.

There are just a few differences between them both, but in general, if you can use one of them definitely you will be able to use the other one.

Does really, we need to learn STL Language?

As we said above there are five types of PLC languages, and for a PLC programmer, there is no need to be professional at all of them.

At first, you have to learn the LAD language very well as it is the basic one and to be an advanced programmer you have to choose another language to learn it very well, and for the rest, you have just be aware of the basic instruction for them.

STL Language in PLC

So, if you are interested with STL language here is some of its Advantages & Disadvantages:

AdvantagesDisadvantages
A statement List is often the quickest way to write your PLC code.

Performing more complex operations like loops and jumps and indirect addressing becomes easier in STL.

It is really very concise and would really save a lot of networks for you.
It is too hard for debugging the code.

It is entirely possible to write STL code but Step-7 will not be able to convert it back to LAD or FBD.

Please before selecting the project language just ask yourself these two questions:

  1. which language makes the code easier, and could support the code needs quickly and efficiently?
  2. Which programming language makes the code more Readable and easier to make later changes or Troubleshoot the machinery faults?

How to build a simple network in STL?

In our first lesson with STL language we will discuss how to perform (AND, OR, NAND, NOR, Assign) instructions using simple examples.

And also, we will convert some of the complicated networks in the LAD language into STL.

AND, AND NOT Instruction

The below instructions are the addressing format of AND and AND NOT instructions in STL language.

Format

A           <Bit Address>              // this for And

AN        <Bit Address>              // this for AND NOT

Description

(A) checks whether the state of the addressed bit is “1”, and ANDs the test result with the RLO.

(AN) checks whether the state of the addressed bit is “0”, and ANDs the test result with the RLO.

Note: RLO is the result of logic operation, this Bit is responsible for adding the logic of each network and save it, as that would help to execute the code logic as desired, and it would really help you a lot in debugging.

Example

Here are we have two inputs (I0.0 when it is false make the RLO = 0 and when it is true make the RLO = 1).

And for the other input inputs (I0.1 when it is false make the RLO = 1 and when it is true to make the RLO = 0) these two inputs control an output (Q0.0).

AND Instruction in STL Language

Fig (1)

AND NOT Instruction in STL Language

Fig (2)

Here as you can see for Fig (1) the value of I0.0 is one and it is translated into the RLO to one, but for I0.1 when the value is zero it is translated into the RLO to one and vice versa.

Also, you can see in Fig (1) when the RLO is (one) till the end of the network it will assign the Q0.0 to be one, but as shown in Fig (2) the RLO is (one) for just the first line, so Q0.0 would be zero.

OR, OR NOT Instruction

The below instructions are the addressing format of OR and OR NOT instructions in STL language.

Format

O           <Bit Address>             // this for OR

ON        <Bit Address>             // this for OR NOT

Description

(O) checks whether the state of the addressed bit is “1”, and ORs the test result with the RLO.

(ON) checks whether the state of the addressed bit is “0”, and ORs the test result with the RLO.

Example

Here is a simple example that shows three different inputs (I0.0 – I0.1 – I0.2) when any one of them is turned to an ON state that would Assign an output (Q0.0).

OR Instruction in STL Language

Fig (3)

OR NOT Instruction in STL Language

Fig (4)

Tia STL Language

Fig (5)

As we can see in Fig (3,4,5) when any one of the three inputs are turned to be ON the RLO became TRUE and by its role, it turns the output Q0.0 to be ON.

Converting a LAD network into STL language

Finally, and to ensure that you got the idea of the article here is a simple tutorial that illustrates how to convert a complex network of LAD into STL language.

LAD Network

Consider the below ladder logic example.

LAD Network

STL Network

The below-mentioned program is the equivalent code of the above ladder logic example.

STL Network

Video Lesson

In the below video, we explained the simple steps to write an STL program from a ladder logic example.

If you liked this article, then please subscribe to our YouTube Channel for PLC and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Read Next:

  • SCADA and HMI Systems
  • Delay Sensor Signal in PLC
  • FB and FC Programming in PLC
  • Edge Detection in PLC Programming
  • Free Mitsubishi PLC Online Training
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
You've successfully subscribed !

Continue Reading

Things to Take Care of When Designing SCADA System
PLC Permissive for Motor Control
Automatic Sanitizer – Complex Ladder Logic PLC Examples
Omron PLC Logic for Washing Machine Automation
Siemens PLC Tia Portal – OB100 Start-up Organization Block
How to Select the Right Encoder for Your Machine?
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
2 Comments
  • YOGESH BHANUDAS ASUTKAR says:
    October 12, 2021 at 12:13 pm

    best artical to clearly understand the baisc concept of STL.
    Thank you!

    Reply
  • irfan says:
    October 21, 2022 at 2:54 pm

    It is use full for bigners.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Siemens S7 1200 PLC configuration in TIA Portal
Sequential PLC Programming for the Pneumatic Valves
How to use Converters in PLC
PLC Power Supply and Operating Voltages
Distributed IO Sharing Between PLC Systems – Technical Insights
How to Add Unspecified CPU in Tia Portal?
PID Block in RSLogix 500
How Modbus is used in Industrial Networks?

Keep Learning

Forward Reverse Motor Control with Repeat Cycle Using PLC

Electric Motor Forward Reverse with Repeat Cycle PLC Logic

Ferrule Example

Ferrules and Cross Ferruling

PID Simulator

PID Simulator Download

How to Create DFB in Schneider PLC? – Derived Function Block

Industrial Networking Interview Questions

Industrial Networking and Wireless Interview Questions

Siemens S7 300 CPU Status and LED Errors Explanation

Siemens S7 300 CPU Status and LED Errors Explanation

PLC Program to Control Level of Series Tanks

Series Tanks Level Control using PLC Ladder Programming

Function of Racks in PLC System

Function of Racks in PLC – Types of SIEMENS S7-400 PLC Racks

Learn More

Electrical Machines Questions and Answers

DC Generators Rotating Amplifiers Quiz

Pre-Startup Safety Review (PSSR)

Pre-Startup Safety Review (PSSR)

diode-basic-structure-symbol

Forward Bias & Reverse Bias of a Diode

PLC Programming Best Practices and Tips

PLC Programming Best Practices and Tips

Transformers Questions & Answers Part-2

Transformers Questions & Answers Part-2

LIC and FIC Controllers

What LIC and FIC Controllers will do?

Pneumatic-Level-Transmitter-Value-Struck

Pneumatic Level Transmitter Value Struck?

Calculate LRV and URV for 4-20 mA Loop-powered DP Transmitter

Calculate LRV and URV for 4-20 mA Loop-powered DP Transmitter

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?