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: Tia Portal – OB20 Time Delay Interrupt Organization Block
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
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Tia Portal – OB20 Time Delay Interrupt Organization Block

Tia Portal – OB20 Time Delay Interrupt Organization Block

In this article, we will discuss about the time delay interrupt organization block or OB20 in Siemens PLC programming.

Last updated: March 28, 2023 3:15 pm
Mahmoud Salama
PLC Tutorials
1 Comment
Share
7 Min Read
SHARE

In previous articles, we discussed what an organization block is, and we talked about the main cyclic interrupt OB1 and the time of day interrupt OB10.

Contents
What is Time Delay Interrupt (OB20)?How to Tell the Operating System to Call the OB20?Parameters of SRT_DINT instructionExample PLC ProgramConclusion

In this article, we will continue discussing the different OBs, and this time we are talking about the Time Delay Interrupt organization block or OB20.

Contents:

  • What is OB20?
  • How to call OB20?
  • Parameters of SRT_DINT instruction.
  • Example Program.
  • Conclusion.

What is Time Delay Interrupt (OB20)?

OB20 is an organization block that is called and executed by the operating system, but we have to tell the operating system when to call this OB20.

The operating system gets the information from the user PLC program to call this OB20, it will wait for the delay time configured then it will call and execute whatever logic is inside the OB20.

We create an OB20 block from Add a new block in the project tree. See picture 1.

What is Time Delay Interrupt (OB20)
Picture 1 – Create a new OB20 block

Now that I have created a time delay interrupt, when will it be executed? And how to configure the time delay of the block execution?

 Again, OB20 is an organization block, which means you don’t call the block to be executed, but you tell the operating system when it can call it and execute whatever functionality is written inside.

How to Tell the Operating System to Call the OB20?

To tell the operating system that we want to call the OB20, we use the SRT_DINT or start time delay interrupt, see picture 2.

Siemens PLC Programming OBs in Siemens TIA Portal
Picture 2 – Start time delay instruction

Parameters of SRT_DINT instruction

As you see from the last picture, you can use the SRT_DINT instruction to call the OB20. but you need to configure some parameters, for the instruction to work.

EN: the instruction will not be executed until a negative edge signal is presented at the EN input. That means you have to assign a condition of the set of conditions to enable signal and the instruction will only work when this condition is true then false again.

OB_NR: you assign the number of the delay interrupt that you need to call, in our case 20 as we created OB20, but we can create more than one delay interrupt and then we will have to call each one with a separate SRT_DINT instruction.

DTIME: that is the delay time you want to wait before executing the OB20, we will set this time to 5 seconds for the sake of simulation.

SIGN: Identifier that appears when the time-delay interrupt OB is called in the start event information of the OB.

Example PLC Program

To better understand the OB20, we will create a simple logic to see how an OB20 can be called and executed. We will build this PLC example on the previous logic we made for the OB1 and OB10 in previous articles.

Inside the OB20 we will create a logic that counts how many OB1 cycles have been called and executed within the 5 seconds delay time that we have configured for the OB20. See picture 3.

Parameters of SRT_DINT instruction
Picture 3 – Logic inside OB20

In the last picture, you see that we used MOVE instruction to push information on cycle counts at the start of the OB20 call and after it has been executed.

See picture 4 for the rest of the logic.

Time Delay Interrupts - Siemens S7-1200
Picture 4 – Calculate how many cycles count inside 5 sec

After that, we will subtract the two values of cycle counts to get how many cycles have been executed within the five seconds delay.

Now that we have created the logic we want, how can we call the OB20? As explained before we have to use the SRT_DINT instruction. We will use this instruction inside the OB10 which we have configured before to be executed every minute. That means the OB20 will also be called and executed every minute but with a delay time of 5 seconds.

In the previous article we built a logic that calls how many times the OB1 is being called and executed, we also built another logic that will call the OB10 every minute.

In this example, we will use the call of the OB10 to call the OB20. See picture 5.

Calling the OB20 through OB10
Picture 5 – Calling the OB20 through OB10

We said before that the SRT_DINT needs a negative edge signal at the EN for the call to start. That is why we used the TimeOfDayInterruptEnabled signal which we know it will be true when OB10 is executed and then go back to false giving us the edge signal we need.

Now that all PLC logic is complete, let’s compile and run a new simulation. See the following simulation of our project.

Siemens PLC Time Delay Interrupt Organization Block

You see in the animation at first the values of cycle counts are zeros but when the OB10 is called and the TimeOfDayInterruptEnabled is true logic will wait 5 seconds then the count values will be updated with cycle counts.

Downloads:

  • PDF Document
  • Siemens PLC Code

Conclusion

  • OB20 is an organization block called and executed by the operating system.
  • We can tell the operating system to call the OB20 with the SRT_DINT instruction.

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

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

Read Next:

  • Global Data Blocks in PLC
  • Configure the Time in PLC
  • SCADA System Architecture
  • Difference between PLC and HMI
  • HMI and VFD Control with Modbus
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

Does Really a Safety Barrier is Important? – PLC DCS Systems
Types of Digital Outputs in PLC
Network Switch Requirement in SCADA and DCS Architecture
Basics of Sinking and Sourcing – Automation System MCQ
Example of Flip-Flop PLC Program for Lamps Application
DCS
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
1 Comment
  • Rolando says:
    April 24, 2023 at 7:49 pm

    I love instrumentationtools.com

    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

Working Principle of Single Phase Preventer Relay
PLC Ladder Logic Simulator Mobile Apps For Android
How to Password Protect HMI in Siemens TIA Portal?
Which Connection is Best for PLC? – Sinking or Sourcing
Converter Instruction in Siemens PLC Programming
PLC Program for Flow Totalizer
SCADA Engineer Job Responsibilities and Skills
Why Use Normally-Closed Contact for Stop Buttons?

Keep Learning

Omron PLC painting program

Product Painting PLC Program using Omron CX-Programmer

Elevator PLC Ladder Logic

Elevator PLC Ladder Logic

PLC Program to Drain Same Products from Two Tanks

PLC Program to Drain Same Products from Two Tanks

PLC Programming Projects for Beginners

PLC Programming Projects for Beginners

DCS Marshalling Cabinet

The Purpose of Marshalling Cabinet or Marshalling Panel

PLC SCADA Water Pump

PLC Program for Controlling a Water Pump with 3 Power Sources

Safety interlock for motor starters in Siemens PLC

Motor Starter Logic using Siemens PLC Tia Portal

PLC Programming for Automated Curtain Control

Automatic Curtain Control – PLC Programming Solution

Learn More

pH Analyzer Calibration and Troubleshooting

pH Analyzer Calibration and Troubleshooting

PLC Motor Control Circuit

Motor Trip Logic using PLC Programming

Omron PLC Mixing System

Mixing Program with Timers and Counters in Omron PLC

Ohm Meter Circuit

Ohm Meter

Difference Between Microcontroller and Microprocessor

Difference Between Microcontroller and Microprocessor

What is Transparent Solar Panel

What is Transparent Solar Panel? – Working Principle and Theory

P&ID Guidelines for Pumps

P&ID Guidelines for Pumps

Difference Between Wifi and Industrial Wireless

Difference Between Wifi and Industrial Wireless

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?