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
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
Notification Show More
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
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

Types of Expressions in the SCL Language of the Tia Portal
How to import GSD files into the TIA Portal? – Siemens PLC
Sorting & Distribution Line PLC Programming – Advanced Logic
Basics of Fail-safe Circuits
Types of PLC Memory
80+ PLC MCQ Questions
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
208kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Case Statement in SCL Language
PLC Program for 2 Push buttons to Control 1 Output
How to Download GX Works? Mitsubishi PLC Software
PLC Program for Food Processing Industry
Interconnection between PLC, MCC, LCP & Pumps – Video
Static and Temp Variables in PLC
Converter Instruction in Siemens PLC Programming
SFC Language in PLC Programming

Keep Learning

Global Data Blocks in PLC

What is a Data Block? Global Data Blocks in PLC

Function of Racks in PLC System

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

Difference Between SCADA and HMI

Difference Between SCADA and HMI

Siemens CPU Clock Memory

Alarm Acknowledge using PLC

Counter Count Down Bit

Down Counter PLC Program

PLC Timer Programming Examples on Coffee Machine

PLC Timer Practice Exercise: Coffee Machine Programming

Comparator used in Siemens S7-1200 PLC.

Siemens PLC Comparator Logic

How to Filter Digital and Analog Inputs in a PLC

#7 PLC Best Practices – Validate and Alert for Paired Inputs/Outputs

Learn More

Building Management System

Building Management System

PLC Program for Solenoid, Pilot Lamp, and Switch with Alarm

PLC Program for Solenoid, Pilot Lamp, and Switch with Alarm

Valve Software

Free Control Valve Software Download

PLC Program for Sequential Motor Control

PLC Program for Sequential Motor Control

Gap Voltage of Bently Nevada Vibration Probe

Gap Voltage of Bently Nevada Vibration Probe

What happen When Synchronous Generator loss Excitation

Fixed PLC

#19 PLC Best Practices – Monitor PLC Memory Usage

SFC Language in PLC Programming

SFC Language in PLC Programming

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?