×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 40654862, Entry date: 04/29/2013
(11)
Rate

Which organization blocks can you use in STEP 7 (TIA Portal)?

  • Entry
  • Associated product(s)
Organization blocks are the interfaces between the operating system and the user program. Below you have an overview of the OBs to be configured in STEP 7 (TIA Portal).

Description
Below is an overview of the organization blocks available in STEP 7 (TIA Portal). Proceed as follows to incorporate an organization block in your program:

  1. Open your STEP 7 project and in the project navigation you navigate to the "Program Blocks" folder.
  2. Under "Program Blocks" you double-click the "Add new block" command.
  3. Then in the dialog that opens you click the "Organization block" (OB) button.
  4. Select the type of OB you need for your program.
  5. Confirm with "OK" to insert the OB in your program.

To obtain more detailed information, mark the OB (event class) concerned in the "Add new block" dialog and click the "more..." link. This opens the Online Help for the marked organization block.
 

Overview of the organization blocks for the S7-1200/1500
 ->Organization blocks for cyclic program processing (S7-1200/-1500)
Higher-level code blocks that are processed cyclically in the program and in which you can program instructions or call other blocks. OB1 is the default block for cyclic execution of the user program.
  • Event class: Program cycle, Name: Main (OB1) 
-> Organization blocks for startup (S7-1200/-1500)
Startup OBs are processed once when the operating mode of the CPU changes from STOP to RUN.
  • Event class: Startup (OB100) 
-> Organization blocks for time delay interrupt (S7-1200/-1500)
After expiry of a defined time, the time delay interrupt OBs interrupt the cyclic program processing.
  • Event class: Time delay interrupt (OB20) 
-> Organization blocks for cyclic interrupts (S7-1200/-1500)
The cyclic interrupt OBs interrupt the cyclic program processing at defined intervals.
  • Event class: Cyclic interrupt (OB30) 
-> Organization blocks for HSC hardware interrupts (S7-1200/-1500)
The hardware interrupt OBs interrupt the cyclic program processing at the occurrence of a hardware event. The hardware interrupts are not only for "Hardware interrupt HSCs", but also for hardware interrupts of digital channels.
  • Event class: Hardware interrupt (OB40) 
-> Organization block for diagnostic error interrupt (S7-1200/-1500)
If the diagnostics-compatible module, for which you have enabled the diagnostic error interrupt, detects an error, the diagnostic error interrupt OB interrupts the cyclic program processing.
  • Event class: Diagnostic error interrupt (OB82) 
-> Organization block for the time error interrupt (S7-1200/-1500)
If the maximum cycle time is exceeded, the time error interrupt OB interrupts the cyclic program processing.
  • Event class: Time error interrupt (OB80) 
-> Organization block for pulling and plugging (S7-1500)
The operating system of the CPU calls the OB when a configured and non-disabled module or submodule of the distributed IO is pulled or plugged.
  • Event class: Pull or plug of modules (OB83) 
-> Organization block for the rack error of a PROFINET IO system (S7-1500)
When a DP master system, slave or part of the submodules fails, the operating system of the CPU calls the OB.
  • Event class: Rack or station failure (OB86) 
-> Organization block for the programming error (S7-1500)
The operating system of the CPU calls the OB if a programming error occurs while processing an instruction of the user program.
  • Event class: Programming error (OB121) 
-> Organization block for the IO access error (S7-1500)
The operating system of the CPU calls the OB if an error during direct access to IO data occurs while processing an instruction of the user program.
  • Event class: IO access error (OB122) 
-> Organization block for the time-of-day interrupt (S7-1500)
The OBs can be started periodically or once at a specific time.
  • Event class: Time of day (OB10 to OB17) 
-> Organization block for the MC Interpolator (S7-1500)
When creating a technology object the OB "MC Interpolator" is called automatically for processing the technology objects.
  • Event class: MC Interpolator (OB92) 
-> Organization block for the MC Servo(S7-1500)
When creating a technology object (Motion) the OB "MC Servo" is called automatically for processing the technology objects (Motion).
  • Event class: MC Servo (OB91) 
-> Organization block for the clocked interrupt (S7-1500)
Program parts can be started synchronized with the DP cycle clock or PN send cycle clock.
  • Event class: Synchronous (OB61) 
-> Organization block for the status interrupt (S7-1500)
The operating system of the CPU calls the OB if a status interrupt occurs.
  • Event class: Status (OB55) 
-> Organization block for the update interrupt (S7-1500)
The operating system of the CPU calls the OB if a update interrupt occurs.
  • Event class: Update (OB56) 
-> Organization block for the manufacturer- or profile-specific interrupt (S7-1500)
The operating system of the CPU calls the OB if a manufacturer-specific or profile-specific interrupt occurs.
  • Event class: Profile (OB57) 


Organization blocks for the S7-300/S7-400
 ->Default block for cyclic execution of the user program
  • Event class: Main (OB1) 
-> Time-of-day interrupt OBs
  • Event class: Time of day (OB10 to OB17) 
-> Time delay interrupt OBs
  • Event class: Time delay (OB20 to OB23) 
-> Cyclic interrupt OBs
  • Event class: Cyclic (OB30 to OB38) 
-> Hardware interrupt OBs
  • Event class: Hardware interrupts (OB40 to OB47) 
-> Status interrupt OB
  • Event class: Alarming (OB55) 
-> OB for manufacturer-specific alarms
  • Event class: Alarming (OB57) 
-> Update alarm OB
  • Event class: Alarming (OB56) 
-> Synchronous cycle OB
  • Event class: Alarming (OB61 to OB64) 
-> Time error interrupt OB
  • Event class: Fault interrupts (OB80) 
-> Power supply failure OB
  • Event class: Fault interrupts (OB81) 
-> Diagnostic error interrupt OB
  • Event class: Fault interrupts (OB82) 
-> Pull/plug OB
  • Event class: Fault interrupts (OB83) 
-> CPU hardware error OB
  • Event class: Fault interrupts (OB84)
-> Program execution error OB
  • Event class: Fault interrupts (OB85) 
-> Rack or station failure OB
  • Event class: Fault interrupts (OB86) 
-> Communications error OB
  • Event class: Fault interrupts (OB87) 
-> Processing abortion OB
  • Event class: Fault interrupts (OB88) 
-> Background OB
  • Event class: Fault interrupts (OB90) 
-> Startup OBs
  • Event class: Startup (OB100, OB101 and OB102) 
-> Programming error OB
  • Event class: Fault interrupts (OB121) 
-> IO access error OB
  • Event class: Fault interrupts (OB122) 

More information about the organization blocks is available in the STEP 7 (TIA Portal) Online Help under:


Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.