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 – OB10 Time of Day Interrupt Organization Block
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 > Tia Portal – OB10 Time of Day Interrupt Organization Block

Tia Portal – OB10 Time of Day Interrupt Organization Block

OB10 is an organization block that can be configured to interrupt the cycle of your PLC program at a certain day and time.

Last updated: March 28, 2023 12:44 pm
Mahmoud Salama
PLC Tutorials
No Comments
Share
9 Min Read
SHARE

In a previous article, we discussed what an organization block is, and we talked about one very important organization block, which is the main OB1.

Contents
What is a Time of Day Interrupt (OB10)?How to Create and Use OB10?Simple PLC Program ExampleImportant Rules for the Time of Day InterruptsConclusion

In this article, we will continue discussing the different OBs and this time we are talking about the time of day interrupt organization blocks or OB10.

Contents:

  • What is time of day Interrupt OB10?
  • How to create and use OB10?
  • Simple program example.
  • Important Rules for the time of day interrupts.
  • Conclusions.

What is a Time of Day Interrupt (OB10)?

As the name suggests, a time of day interrupt is an organization block that will interrupt the execution of the main cycle of your PLC program at a certain time of the day. This interrupt time (date and time) can be specified to occur once at a specified time or to occur periodically at specified time intervals, for example, every minute, hour, day, week, and some other options.

You can have more than one time-of-day interrupt in the same program, they don’t have to have the same logic or code, each one can have its own functionality and also each one can be configured separately to occur at a specified time.

How to Create and Use OB10?

To create a time of day interrupt you follow the same steps you would do if you need to add any new block into your logic. See picture 1.

OB10 Time of Day Interrupt
Picture 1 – Add a time of day interrupt

Press the Add new block option in the project tree on the left, choose organization block, and then choose a time of day interrupt as shown in the previous picture.

Now you can open the OB10 and add whatever PLC logic you want to execute when this block is called, by called we mean that the interrupt event or time has occurred and so the operating system will interrupt the main cycle and execute the OB10.

We will write a very simple code into the OB10 to help us better understand how this OB10 block works. In this logic, we used add instruction to add a value of 1 to a memory area that we called TimeOfDayInterruptCounter and then put the result of the summation back in the same area. That way we can have a counter for the execution of the OB10.

Each time the OB10 will be called and executed, the value of TimeOfDayInterruptCounter will increase by 1. See picture 2.

Time-of-Day Interrupt Organization Blocks
Picture 2 – Add your logic to the OB10

Now that we have created the OB10 and written some logic inside, we need to configure the set time of the OB10 and how many times we want it to interrupt our main cycle.

To configure the time and interval setting of the OB10 we need to go to the properties page of the OB10. See picture 3.

Time delay interrupt TIA Portal
Picture 3 – Properties of OB10

In the properties of the OB10, you will find a lot of settings and attributes that you can configure.

What we need now is the time of day interrupt page so we can set up when the OB10 will be called and how many times. See picture 4.

Siemens S7-1200 Time Delay Interrupts
Picture 4 – Time of day interrupt setting

As you see from the last picture, you can set the execution of OB10, the start date, and the time of day at which the OB10 should be executed.

For the sake of simulation, we made the execution interval to be every minute so that every minute the OB10 will be called and executed. That means starting from the date of 3/23/2023 and time 09:25 AM the value of TimeOfDayInterruptCounter will increase by 1 every minute.

You have the option of setting the time according to the PLC system time or local time as you see from the last picture. In a previous article, we talked about the system and local time of the PLC, what each time mean, and how to configure and use them.

As we said before the local time is the time you see now on your PC.  So it is the actual time of the region where the PLC will be used.

You have to configure the local time for the PLC, depending on where it will be used. See picture 5.

Time delay interrupt in PLC
Picture 5 – Setting the local time for the PLC

Simple PLC Program Example

We added a time of day interrupt OB10 to our PLC program and we have set it so it will be executed every minute. We also have configured the local time of the PLC.

We created a simple logic of an ADD instruction to accumulate the value of the TimeOfDayInterruptCounter by 1 each time the OB10 is executed.

We will add another instruction, but in the main OB1, this instruction is RD_LOC_T or read local time, so we can see how the local time is progressing and compare it with the execution of OB10. See picture 6.

Configure Siemens Interrupt OB
Picture 6 – Simple program example

Compile your PLC program and start a new simulation.

Notice that we will set the time of day interrupt occurrence so that the OB10 can be called and executed while we are simulation the PLC logic. See the following simulation.

PLC Time of Day Interrupts

As you see from the animation, the value of TimeOfDayInterruptCounter is zero at the start and then it will be increased by 1 every minute starting from time 09:25 AM indicating that the OB10 is being executed every minute.

Important Rules for the Time of Day Interrupts

  • If you set a time interrupt in such a way that the corresponding OB is to be processed once, the start time must not be in the past (relative to the real-time clock of the CPU).
  • If you set a time interrupt in such a way that the corresponding OB is to be processed periodically, but the start time is in the past, then the time interrupt OB is processed the next time it is due according to the current time.
  • The date of periodic time interrupts must correspond to a real date. For example, the monthly repetition of a time interrupt OB with a start date of 1/31 is therefore not possible. In this case, an OB is only started in the months that have 31 days.
  • A time interrupt activated during startup is not executed until the startup has been completed.
  • A startup deletes all time interrupts that were set and activated by an instruction in the user program.

Downloads:

  • OB10 Time of Day Interrupt Document
  • Siemens PLC Example Program

Conclusion

OB10 is an organization block that can be configured to interrupt the cycle of your program at a certain day and time. This interrupt can either occur once or periodically every certain amount of time.

No specific reason why would you need an OB10, as it depends on your process and your logic. And yes, you can achieve the same functionality using your personal code, but it is an available and easy-to-use built-in function. And you know how to use it.

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
  • Timers in Siemens Tia Portal
  • SCADA System Architecture
  • Static and Temp Variables in PLC
  • PLC Programming Best Practices
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

Example PLC Program
Communication between Factory IO and Siemens Tia Portal
What is Process Control?
Smart Automation Solutions: PLC Logic for Stairway Lighting
Why 24 Volts DC Power Supply is used? – Industrial Automation Systems
LIFO Instruction in PLC
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

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

What are Functions in PLC Programming? (FCs)
How to Get a PLC Programming Job With NO Experience?
Various Control Methods in Servo Motor Drives
Features of SCADA
Create an Application in HMI using Tia Portal
PLC Program for Temperature Control using Thermostat
#4 PLC Best Practices – Use PLC Flags as Integrity Checks
OpenPLC – PLC Training for Students – Free Tutorials & Courses

Keep Learning

Control Loops

Control Loops Objective Questions and Answers

TIA Portal MOVE Instruction

MOVE Instruction in PLC – What You Need to Know?

ON and OFF a Group of Outputs by One Push button PLC Logic

ON and OFF a Group of Outputs by One Push button PLC Logic

PLC Sizes and Applications

PLC Sizes and Applications

Delta HMI and VFD Control with Modbus

Delta HMI and VFD Control with Modbus

How to Read an Electrical Wiring Diagram

How to Read an Electrical Wiring Diagram?

Analog Instruments

Explaining Various Types of Analog Instruments

Introduction to GOC controllers

Mitsubishi Electric GOC Controllers

Learn More

What is a Pilot Valve?

What is a Pilot Valve? When do we use a Pilot Valve?

Network topologies

Different Types of Network Topologies

PLC program for bread oven

Bread Oven Control in Auto and Manual Modes PLC Program

Pressure and Temperature Compensation for Flow Transmitter

Why Pressure & Temperature Compensation required for Orifice Flow Meters ?

Automating Car Parking with Advanced PLC Logic

Complex Car Parking Logic in XG5000 LS Electric PLC

shape of the trim determines the valve characteristic

Control Valve Characteristics

Intrinsic Safety Zones

Intrinsic Safety Protection ia and ib

Why Restriction Orifice is some distance from Blowdown valve

Why Restriction Orifice is some distance from Blowdown valve ?

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?