Configuring and Usage of Cyclic Interrupts TIA Portal (OB 30+)

Very critical and important tool that could really advance your code and make you really professional programmer is how to use and configure cyclic interrupts using TIA portal that is launched by siemens, it would help your code so much making it more reliable and more efficient.

How does the TIA Portal work?

First of all, we should understand some basic concepts about TIA portal

Organization Block (OB)

The TIA portal software has different kinds of organization blocks, Each type of these blocks have its own

usage and application, all of them are optional (which means that you can use it or not) except one of them that contains the main program called Main OB (OB 1), our article will not explain the usage of all of them, we will just work with the cyclic OBs (OB 30+)


This word is not specialized for siemens, interrupts are some specified and Critical Routines that the programmer wants to be executed at a certain time and events.

So interrupts do not wait for the main program to finish its cycle then it will be executed, Absolutely Not once interrupts are occurred it stops the main OB at the breakpoint and execute its routine then the main OB resumes the program from the breakpoint again.

understand basic concepts about TIA portal

Priority of an interrupt

Very important note that you should be aware about it, is the priority of the interrupt that you are using.

Every interrupts in the TIA portal has a number called the priority that refers to the arrangement of that interrupt between the whole interrupts, assume that two interrupts occur at the same time.

The PLC will execute the higher one in priority at first then the Second interrupt(that has lower priority) then it will go back again to Main OB.

Interrupting the Cyclic Program in Siemens Tia Portal

Cyclic Interrupts (OB 30+)

The idea behind that interrupt, that you can configure one of them to be executed with certain cyclic times that is independent on the time of the scan cycle of your main program.

Cyclic interrupts in TIA portal generally have the priority of (30 : 38) that depends into the CPU that you have, Not all of them have the same cyclic interrupt, some CPUs have just (32 : 35) other CPUs may have another group of cycle interrupts, do not let that make you to be confused.

Application of Cyclic Interrupts

  1. Safety, in your project safety is first so during your process you may need some safety actions that should be checked periodically with certain times.

2. PID controllers, the time of the main scan cycle may affect at the accuracy of your PID actions, so you do not want to relate its actions with the time of the scan cycle, so you push your PID instructions into a cyclic interrupt to be executed periodically with certain cyclic times.


One of the best PLC interview questions “How could you make a program that controls two alternative loads without using any timer” ……

Note that this example is used just for examine that you really can configure and use cyclic interrupts.

Cyclic Interrupts in TIA Portal


First of all, select your desired CPU from “configure a new device”

1.   Select add new block

Configuring and Usage of Cyclic Interrupts TIA Portal (OB 30+)

2.   Select add new organization block

Select add new organization block in Tia Portal

3. Then select any interrupt of them, then press OK

Select any interrupt in Tia Portal

4.   After you select the desired one it will be shown under your program blocks

Select the program blocks in Tia Portal

5.   Then select your CPU properties to configure the execution time

select your CPU properties to configure the execution time

6. Then write your program as shown in the next Figure.

Cyclic Interrupts in TIA Portal

Finally, you will never get 100% of understanding till you try something by your self so please try to make it on your TIA and feel free to send me back to discuss that.

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:

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

1 thought on “Configuring and Usage of Cyclic Interrupts TIA Portal (OB 30+)”

  1. One question. How can i program a motor to run CW and CCW with one button and a stop between the two directions. All with one button, meaning one press of the button CW motor, one more press of the button stop the motor, one more press the button CCW of the motor and stop after one more press of the button….


Leave a Comment