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: Timers using Statement List (STL) PLC Programming
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 > Timers using Statement List (STL) PLC Programming

Timers using Statement List (STL) PLC Programming

In this article, we are going to learn the ON Delay timer and OFF delay timer using STL (statement list) PLC programming.

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

Hello and welcome back with another STL lesson, if you are interested with SIEMENS PLCs and specially with the Statement List language.

Contents
Timers in STLTimer Properties with SIEMENS PLCsArea in MemoryTime ValueTime BaseON Delay Timer in STLOFF Delay Timer in STLExample Timer STL Program

Here is a series that discuss this language in detail and with practical examples.

So, if that is your first time on Instrumentation Tools, do not forget to check the previous lessons.

Timers in STL

Today we are going to explain two different types of timers using the STL language:

  • On Delay Timer
  • Off Delay Timer

Also, we will give an example that discusses a common issue that happens in most plants.

Timer Properties with SIEMENS PLCs

Area in Memory

Timers have an area reserved for them in the memory of your CPU. This memory area reserves one 16-bit word for each timer address.

The number of timers depends on your PLC CPU version.

As we can see in the next figure the first 12 bits are reserved for the time value, and for (12 – 13) bits they are reserved for the Time Base.

Timer Properties with SIEMENS PLC

Time Value

You can pre-load a time value using either of the following formats:

Format 1:

W#16#txyz

Where t = the time base (that is, the time interval or resolution)

Where xyz = the time value in binary coded decimal format

Format 2:

S5T#aH_bM_cS_dMS

Where H = hours, M = minutes, S = seconds, and MS = milliseconds;

user variables are: a, b, c, d

The time base is selected automatically, and the value is rounded to the next lower number with that time base.

Time Base

Bits 12 and 13 of the timer words contain the time base in binary code.

The time base defines the interval at which the time value is decremented by one unit.

Binary coded for the time baseTime BaseRange
0010 MS10MS to 9S_990MS
01100 MS100MS to 1M_39S_900MS
101 S1S to 16M_39S
1110 S10S to 2H_46M_30S

ON Delay Timer in STL

Format

SD          < Timer >             // data type for this instruction is a timer

Description

SD <timer> starts the addressed timer when the RLO transitions from “0” to “1”. The programmed time interval elapses as long as RLO = 1.

The time is stopped if RLO transitions to “0” before the programmed time interval has expired.

We can say that it delays the stating function, till the preset time finished.

ON Delay Timer in STL Function

OFF Delay Timer in STL

Format

SF           < Timer >             // data type for this instruction is a timer

Description

SF <timer> starts the addressed timer when the RLO transitions from “1” to “0”. The programmed time elapses as long as RLO = 0.

The time is stopped if RLO transitions to “1” before the programmed time interval has expired.

We can say that it delays the stopping function, till the preset time finished.

OFF Delay Timer in STL Function

Example Timer STL Program

A very common issue that occurs in several plants, is an instant high current consuming Spicks in your plant due to much of starting current taken by several motors that are turned ON at the same time.

The Electric Network of your plant will suffer from an Undervoltage due to these current spikes.

For equipment that it can not correctly operate at such low levels of incoming supply voltage, it may have serious damage to its components.

So, to avoid such a situation we need to start our plant motors in a sequence to eliminate the current consumption spicks.

By assuming that we have three motors that we need to operate them in order with a delay of 10 sec. we could program such a situation like that:

Timer STL Programming

For the first network, we can see that the start and stop pushbuttons are attached to a marker, so when pressing start the Main Maker = True, and when pressing stop the Main Marker = False.

and also, as soon as we press start the first motor starts to run.

Start and Stop of the Process using STL Program

For the next figure that is an ON-Delay Timer that delays the starting of the second motor by 10 seconds, as we could see in the red box the timer is loaded with (10s).

For the black box, the input signal M0.0 enables the timer T1 by the FR instruction (free) this instruction is responsible for initializing the timer.

For the yellow box, we are just loading the timer counting value to another location of memory (MW10).

For the blue box, when the timer reaches the preset time value it will launch the output bit Q0.1 that is responsible for starting the second motor.

ON Delay Timer Example using STL Program

Here is another timer for the third motor but you can notice that the preset time is 20 sec to maintain the delay time between the three motors to be 10 sec.

OFF Delay Timer Example using STL Program

That is all for now, and if you want to get a try you can make the same logic but instead of the motors are starting in sequence what about if we want to stop them in sequence also.

Give it a try using the STL language and if you are facing some issues you can post your questions using the below comments form.

Reference: Statement List for S7-300 and S7-400 Function Manual

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:

  • UPS Selection Factors
  • Ladder Logic Training Course
  • PUT & GET PLC Instructions
  • Servo Motor and Stepper Motor
  • Causes for PLC Going in Stop Mode
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

PLC SCADA Engineers Interview Questions and Answers
Use of Regions in SCL Language
Schneider PLC Example Program for Star-Delta System
Mitsubishi Electric GOC Controllers
Inside the PLC Control Panel: How Much Do You Know?
PLC Ladder Logic Design: Control 3 Motors with Toggle Switch
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
2 Comments
  • Unni says:
    February 3, 2022 at 7:35 am

    Could you provide explanation for math functions using STL programing for seimens s7- 400

    Reply
  • Tsepo says:
    February 17, 2022 at 3:15 pm

    Hi, thanks for the info. Just a quick question, how do I know which “T#” to use? Do i just pick a random number or ?

    Many thanks
    Tsepo.

    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

Overview of Industrial Control Systems
PLC Program for Paint Spraying
How to Check Address Overlapping in Tia Portal?
Create PLC Program based on Logic Circuit
What is Nest Loading? – DCS and PLC Control Systems
Overview of SIEMENS PLC – S7-1500, S7-1200, S7-400, S7-300
PLC Simulator using Excel
Structured Text PLC Example for Motor Interlocking and Control

Keep Learning

Basic PLC Exercise on Heater and Cooler for Students

Basic PLC Exercise on Heater and Cooler for Students

PLC Program for Automatic Bottle Rejection System

PLC Program for Automatic Bottle Rejection System

Conveyor Sorting Machine PLC Program

Conveyor Sorting Machine PLC Program with Calculation Function

Flip-Flop PLC Program for Lamps Application

Example of Flip-Flop PLC Program for Lamps Application

Siemens Process Mode

Test and Process Modes in Siemens PLC

PLC Technique for IO Mapping

PLC Techniques for I/O Mapping

traffic light plc program

Traffic Light Control using PLC Ladder Logic

Garage Door Roller Shutter

Shutter Door Control using Motor and Limit Switches

Learn More

Connect the Differential Pressure Gauge at the Filter

How Do You Connect the Differential Pressure Gauge at the Filter?

Instrumentation Thread

Thread Sealant Types and Selection for Instrumentation Applications

What is a Soft Starter

What is a Soft Starter? Principle, Advantages, Disadvantages

Comparison of Level Meters - Level Measurement Instruments

Comparison of Level Meters – Level Measurement Instruments

VFD Block Diagram

What is a VFD? – Theory, Advantages, Disadvantages

Economizer

What is an Economizer? Purpose, Classification, Advantages

Porpoising PID Controller

Recognizing a Porpoising PID Controller

Level Sensor Pressure vessel mounting

Level Instruments Design Rules

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?