OB – Organization Block interrupts – what you should always have in your software

0
Organization Block OB TIAPortalHowTo.com
Organization Block OB

1. Types of Organizational Blocks – OB in TIA Portal

The most common OB in TIA Portal, without which, your software will not work is OB1 (Program Cycle). This OB, being the main block of the program, is called cyclically, which means it will always be called once per PLC scan.

There are however other types of OBs:

  • Startup
  • Time delay interrupt
  • Cyclic interrupt
  • Hardware interrupt
  • Time error interrupt
  • Diagnostic error interrupt
  • Pull or plug of modules
  • Rack or station failure
  • Programming error
  • IO access error
  • Time of Day
  • MC-Interpolator
  • MC-Servo
  • MC- Pre Servo
  • MC Post Servo
  • Synchronous Cycle
  • Status
  • Update
  • Profile

To find out more about a particular type of OB press the ‘more…’ link and you will be taken to TIA Portal help:

Organization Blocks OB in TIA Portal TIAPortalHowTo.com
Organization Blocks OB in TIA Portal

More information about the types of OB (Organization Blocks) in TIA Portal can be found on Siemens website: Which organization blocks can you use in STEP 7 (TIA Portal)?

2. Error OBs in TIA Portal

Some of the OBs (Organization Blocks) in TIA Portal are triggered when a specific error occurs and here is the most important thing:

If your program does not have an OB that PLC is trying to call because of a specific error, THE PLC WILL GO IN TO STOP MODE!


In majority of the applications this unacceptable.

3. Which OBs do I need in my PLC to prevent PLC stop?

This mostly depends on the hardware you are using. For example, if you have a remote IO, lets say ET200SP you will need:

  • OB82 – Diagnostics error interrupt
  • OB83 – Pull or plug of modules
  • OB86 – Rack or station failure
  • OB121 – Programming error
  • OB122 – IO access error

Basically it’s better to have more then less of OBs in the PLC because: A) OBs won’t be triggered until a particular condition is met – so they will not extend your scan cycle B) They will not eat away your PLC memory as they will nor hold a lot of code (are will even be completely empty)

I would recommend inserting the following OBs in to your program:

Organization Blocks OB STOP PLC TIAPortalHowTo.com
Organization Blocks OB STOP

4. What should be inside an OB?

Ideally you should put some diagnostic code in. For example set a bit that will later trigger an alarm on your HMI / SCADA. Or you could record a time and date of the event that triggered the OB. Worst case you can leave it completely empty! It will still serve its purpose, which is not letting the PLC go in to STOP mode.

Last important thing to consider. There might actually be applications in which you will want the PLC to go in to STOP mode when a serious error occurs, but you can do this via a software command placed within an OB.

0 Shares