show the entry list
STEP 7 (TIA Portal) -- Creating S7 programs -- Calling blocks and functions
What should you watch out for in STEP 7 (TIA Portal) when transferring FC and FB parameters for new S7-1200/S7-1500 controllers?
What is the maximum number of parameters you are allowed to define in STEP 7 (TIA Portal) for a function in the S7-1200/S7-1500 CPU?
How do you read out the IP address of the PROFINET interface of a S7-1500 CPU in the user program?
How do you program and parameterize Modbus TCP communication between two S7-1200 CPUs?
In STEP 7 (TIA Portal), how can you read out diagnostics data of a hardware object with the GET_DIAG instruction?
What are the block protection facilities available in STEP 7 to protect the the know-how of your blocks?
Why is the "GET_NAME" instruction not executed in STEP 7 (TIA Portal) V12?
Why should whole structures instead of many single components be transferred for the S7-1500 when a block is called?
What differences should you watch out for between optimized data storage and the standard type of block access in STEP 7 (TIA Portal) V12?
What types of access, value columns and operator input options are available for the global data blocks in STEP 7 (TIA Portal) V12?
How do you program the TSEND_C and TRCV_C instructions for open user communication over the integrated PROFINET interface of the S7-1200 CPU?
How do you program the TC_CONFIG instruction to change the parameters of a CP1242-7 configured in STEP 7?
How are the automatic PID controller settings (optimization) made for asymmetrical temperature control paths in STEP 7 (TIA Portal) V11 and higher?
How do you change the pulse length for the pulse width modulation (PWM) in the user program of the S7-1200 CPU?
How do you compile blocks with know-how protection in STEP 7 (TIA Portal) V11 when they have been copied from another project?
Where can you download the F FBs for the Mobile Panel 277F IWLAN for the Safety option of STEP 7 V5.5, STEP 7 Professional V11 and STEP 7 Professional V12?
Which organization blocks can you use in STEP 7 (TIA Portal)?
How in STEP 7 V11 do you save the value of an "HSC" (high-speed counter) for the S7-1200 after STOP mode or after a restart?
Which Motion Control functions are there in STEP 7 (TIA Portal) V11 and how do you use these functions?
In STEP 7 (TIA Portal) how do you configure data blocks with the "Only store in load memory" attribute?
How do you open blocks that are know-how protected in STEP 7 V11 in a different project when they have been downloaded from the CPU?
Which organization blocks can you use in STEP 7 (TIA Portal)?
Part number:

Description
The two tables below give 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 organization block marked. The table below shows the OBs for the S7-1200/1500:
 
Overview of the organization blocks for the S7-1200/1500
Organization blocks 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 (Motion) the OB "MC Interpolator" is called automatically for processing the technology objects (Motion).
  • 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 an 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- or profile-specific interrupt occurs.
  • Event class: Profile (OB57)

The table below shows the OBs for the S7-300/400
Organization blocks for the S7-300/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)
Process alarm OBs
  • Event class: Hardware interrupts (OB40 to OB47)
Status interrupt OB
  • Event class: Alarm (OB55)
Update alarm OB
  • Event class: Alarm (OB56)
OB for manufacturer-specific alarms
  • Event class: Alarm (OB57)
Clocked interrupt OB
  • Event class: Alarm (OB61 to OB64)
Time error interrupt OB
  • Event class: Fault interrupts (OB80)
Power supply failure OB
  • Event class: Fault interrupts (OB81)
Diagnostics alarm OB
  • Event class: Fault interrupts (OB82)
Pull/plug OB
  • Event class: Fault interrupts (OB83)
CPU hardware error OB
  • Event class: Fault interrupts (OB84)
Program runtime error OB
  • Event class: Fault interrupts (OB85)
Subrack 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:

  • Creating organization Blocks
  • Organization blocks (S7-1200)
  • Organization blocks (S7-1500)
  • Organization blocks (S7-300/400)

 Entry ID:40654862   Date:2013-04-29 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Topics
Help
Online Help
Guided Tour