Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

s Preface Contents Organization Blocks 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 SIMATIC System
Nội dung xem thử
Mô tả chi tiết
s
Preface
Contents
Organization Blocks 1
Common Parameters for SFCs 2
Copy and Block Functions 3
SFCs for Controlling Program
Execution 4
SFCs for Handling the System
Clock 5
SFCs for Handling Run-Time
Meters 6
SFCs/SFBs for Transferring
Data Records 7
DPV1 SFBs According to
PNO AK 1131 8
SFCs for Handling Time-of-Day
Interrupts 9
SFCs for Handling Time-Delay
Interrupts 10
SFCs for Handling
Synchronous Errors 11
SFCs for Handling Interrupts
and Asynchronous Errors 12
SFCs for Diagnostics 13
SFCs and SFBs for Updating
the Process Image and
Processing Bit Fields
14
System Functions for
Addressing Modules 15
SFCs for Distributed I/Os or
PROFINET IO 16
PROFInet 17
SIMATIC
System Software for
S7-300/400 System and
Standard Functions
Volume 1/2
Reference Manual
This manual is part of the documentation
package with the order number:
6ES7810-4CA08-8BW1 FBs for Cyclical Access to User
Data according to the PNO 18
Edition 03/2006
A5E00709327-01
Siemens AG
Automation and Drives
Postfach 4848
90437 NÜRNBERG
GERMANY
A5E00709327-01
03/2006
Copyright © Siemens AG 2006
Technical data subject to change
Safety Guidelines
This manual contains notices you have to observe in order to ensure your personal safety, as well as to
prevent damage to property. The notices referring to your personal safety are highlighted in the manual
by a safety alert symbol, notices referring to property damage only have no safety alert symbol. The
notices shown below are graded according to the degree of danger.
! Danger
indicates that death or severe personal injury will result if proper precautions are not taken.
! Warning
indicates that death or severe personal injury may result if proper precautions are not taken.
! Caution
with a safety alert symbol indicates that minor personal injury can result if proper precautions are not
taken.
Caution
without a safety alert symbol indicates that property damage can result if proper precautions are not
taken.
Notice
indicates that an unintended result or situation can occur if the corresponding notice is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of
danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a
warning relating to property damage.
Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning
and operation of a device/system may only be performed by qualified personnel. Within the context of
the safety notices in this documentation qualified persons are defined as persons who are authorized to
commission, ground and label devices, systems and circuits in accordance with established safety
practices and standards.
Prescribed Usage
Note the following:
! Warning
This device and its components may only be used for the applications described in the catalog or the
technical description, and only in connection with devices or components from other manufacturers
which have been approved or recommended by Siemens.
Correct, reliable operation of the product requires proper transport, storage, positioning and assembly
as well as careful operation and maintenance.
Trademarks
All names identified by ® are registered trademarks of the Siemens AG.
The remaining trademarks in this publication may be trademarks whose use by third parties for their
own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However,
the information in this publication is reviewed regularly and any necessary corrections are included in
subsequent editions.
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01 iii
Preface
Purpose
This manual provides you with a comprehensive overview of the organization
blocks (OB), system functions (SFC), system and standard function blocks (SFC),
and IEC functions contained in the operating systems of the CPUs of the S7-300
and S7-400, diagnostic data, system status lists (SZL), and events.
Note
Refer to the reference section of the "S7-300 Automation System
CPU Specifications: CPU 31xC and CPU 31x" and "S7-300 Automation System
CPU Specifications: CPU 312IFM - 318-2 DP“ /70/ or the
"Automation System S7-400: CPU Specifications" reference manual /101/ or the
Instruction List: S7-400 Programmable Controller /102/ (whichever version applies
to your CPU) for details of which of these functions and blocks are available on
which CPU. The properties of the CFBs and the S7 signaling functions for specific
CPUs are described in /70/ and /101/.
For information about the CPU operating systems, program design, and the
communications and diagnostic capabilities of the CPUs, refer to the
"Configuring Hardware and Communication Connections STEP 7 V5.4" manual
/234/ How to call functions and function blocks in your program is explained in the
language descriptions.
You program and assign parameters for all these functions using the STEP 7
standard software. How to use this software is described in the
"Programming with STEP 7 V5.4" manual /231/ and in the STEP 7 online help.
Audience
This manual is intended for programmers and engineers who are familiar with
controlling processes and are responsible for writing programs for programmable
logic controllers.
Preface
System Software for S7-300/400 System and Standard Functions - Volume 1/2
iv A5E00709327-01
STEP 7 Documentation Packages
The following table displays an overview of the STEP 7 documentation:
Documentation Purpose Order Number
STEP 7 Basic Information with
• Working with STEP 7 ,
Getting Started Manual
• Programming with STEP 7
• Configuring Hardware and
Communication Connections, STEP 7
• From S5 to S7, Converter Manual
Basic information for technical
personnel describing the methods
of implementing control tasks with
STEP 7 and the S7-300/400
programmable controllers.
6ES7810-4CA08-8BW0
STEP 7 Reference with
• Ladder Logic (LAD)/Function Block
Diagram (FBD)/Statement List (STL)
for S7-300/400 manuals
• Standard and System Functions for
S7-300/400
Volume 1 and Volume 2
Provides reference information
and describes the programming
languages LAD, FBD, and STL,
and standard and system
functions extending the scope of
the STEP 7 basic information.
6ES7810-4CA08-8BW1
Online Helps Purpose Order Number
Help on STEP 7 Basic information on
programming and configuring
hardware with STEP 7 in the form
of an online help.
Part of the STEP 7
Standard software.
Reference helps on STL/LAD/FBD
Reference help on SFBs/SFCs
Reference help on Organization Blocks
Context-sensitive reference
information.
Part of the STEP 7
Standard software.
Preface
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01 v
Online Help
The manual Volume 1 and Volume 2 is complemented by an online help which is
integrated in the software. This online help is intended to provide you with detailed
support when using the software.
The help system is integrated in the software via a number of interfaces:
• There are several menu commands which you can select in the Help menu:
The Contents command opens the index for the Help on STEP 7.
• Using Help provides detailed instructions on using the online help.
• The context-sensitive help offers information on the current context, for
example, an open dialog box or an active window. You can open the contextsensitive help by clicking the "Help" button or by pressing F1.
• The status bar offers another form of context-sensitive help. It displays a short
explanation for each menu command when the mouse pointer is positioned on
the menu command.
• A brief explanation is also displayed for each icon in the toolbar when the
mouse pointer is positioned on the icon for a short time.
If you prefer to read the information from the online help in printed format, you can
print out individual help topics, books, or the entire online help.
This manual is an extract from the HTML-based Help on STEP 7. As the manual
and the online help share an almost identical structure, it is easy to switch between
the manual and the online help.
Feedback on Documentation
To help us to provide the best possible documentation for you and future STEP 7
users, we need your support. If you have any comments or suggestions relating to
this manual or the online help, please complete the questionnaire at the end of the
manual and send it to the address shown. Please include your own personal rating
of the documentation.
Other Manuals
The various S7-300 and S7-400 CPUs and the S7-300 and S7-400 modules are
described in the following manuals:
• For the S7-300 programmable logic controller, refer to the manuals: "
Automatisierungssystem S7-300 CPU-Daten: CPU 31xC und CPU 31x und
Automatisierungssystem S7-300 CPU-Daten: CPU 312 IFM bis 318-2 DP“ "
/70/, "S7-300, M7-300 Programmable Controllers Module Specifications" /71/
and in the Instruction List /72/.
• For the S7-400 programmable logic controller, refer to the manual:
"Automatisierungssystem S7-400: CPU Daten " /101/ and in the Instruction List
/102/.
Preface
System Software for S7-300/400 System and Standard Functions - Volume 1/2
vi A5E00709327-01
How to Use this Manual
This manual covers the following topics:
• Chapter 1 explains the functions of all the organization blocks.
• Chapter 2 describes the common parameters RET_VAL, REQ and BUSY.
• Chapters 3 to 29 describe the SFCs, SFBs and IEC-FCs.
• The Chapters sections 30 to 35 contain a description of the structure of the
diagnostic data, an overview of the SZL-IDs, the possible events, lists of the
SFCs, SFBs and FCs described in this manual, an overview of the SDBs.
• The bibliography contains a list of further manuals.
• The Glossary explains important terminology.
• The Index helps you to locate sections of text and topics quickly.
Conventions
References to other manuals and documentation are indicated by numbers in
slashes /.../. These numbers refer to the titles of manuals listed in the bibliography.
Special Note
The system functions can be interrupted. If there are any restrictions that apply to
certain SFCs or situations, these are explained in the description of the particular
SFC.
Further Support
If you have any technical questions, please get in touch with your Siemens
representative or responsible agent.
You will find your contact person at:
http://www.siemens.com/automation/partner
You will find a guide to the technical documentation offered for the individual
SIMATIC Products and Systems here at:
http://www.siemens.com/simatic-tech-doku-portal
The online catalog and order system is found under:
http://mall.automation.siemens.com/
Training Centers
Siemens offers a number of training courses to familiarize you with the SIMATIC
S7 automation system. Please contact your regional training center or our central
training center in D 90327 Nuremberg, Germany for details:
Telephone: +49 (911) 895-3200.
Internet: http://www.sitrain.com
Preface
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01 vii
Technical Support
You can reach the Technical Support for all A&D products
• Via the Web formula for the Support Request
http://www.siemens.com/automation/support-request
• Phone: + 49 180 5050 222
• Fax: + 49 180 5050 223
Additional information about our Technical Support can be found on the Internet
pages http://www.siemens.com/automation/service
Service & Support on the Internet
In addition to our documentation, we offer our Know-how online on the internet at:
http://www.siemens.com/automation/service&support
where you will find the following:
• The newsletter, which constantly provides you with up-to-date information on
your products.
• The right documents via our Search function in Service & Support.
• A forum, where users and experts from all over the world exchange their
experiences.
• Your local representative for Automation & Drives.
• Information on field service, repairs, spare parts and more under "Services".
Preface
System Software for S7-300/400 System and Standard Functions - Volume 1/2
viii A5E00709327-01
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01 ix
Contents
1 Organization Blocks 1-3
1.1 Overview of the Organization Blocks (OBs) ..................................................... 1-3
1.2 Program Cycle Organization Block (OB1)........................................................ 1-3
1.3 Time-of-Day Interrupt Organization Blocks (OB10 to OB17) ........................... 1-3
1.4 Time-Delay Interrupt Organization Blocks (OB20 to OB23)............................. 1-3
1.5 Cyclic Interrupt Organization Blocks (OB30 to OB38)...................................... 1-3
1.6 Hardware Interrupt Organization Blocks (OB40 to OB47)................................ 1-3
1.7 Status Interrupt OB (OB 55) ............................................................................. 1-3
1.8 Update Interrupt OB (OB 56)............................................................................ 1-3
1.9 Manufacturer Specific Interrupt OB (OB57)...................................................... 1-3
1.10 Multicomputing Interrupt Organization Block (OB60) ....................................... 1-3
1.11 Synchronous Cycle Interrupt OBs (OB 61 to OB 64) ....................................... 1-3
1.12 Technology Synchronization Interrupt OB (OB 65) .......................................... 1-3
1.13 I/O Redundancy Error OB (OB70).................................................................... 1-3
1.14 CPU Redundancy Error OB (OB72)................................................................. 1-3
1.15 Communication Redundancy Error OB (OB73) ............................................... 1-3
1.16 Time Error Organization Block (OB80)............................................................. 1-3
1.17 Power Supply Error Organization Block (OB81) .............................................. 1-3
1.18 Diagnostic Interrupt Organization Block (OB82) .............................................. 1-3
1.19 Insert / Remove Module Interrupt Organization Block (OB83)......................... 1-3
1.20 CPU Hardware Fault Organization Block (OB84) ............................................ 1-3
1.21 Priority Class Error Organization Block (OB85) ............................................... 1-3
1.22 Rack Failure Organization Block (OB86).......................................................... 1-3
1.23 Communication Error Organization Block (OB87)............................................ 1-3
1.24 Processing Interrupt OB (OB 88)...................................................................... 1-3
1.25 Background Organization Block (OB90)........................................................... 1-3
1.26 Startup Organization Blocks (OB100, OB101 and OB102).............................. 1-3
1.27 Programming Error Organization Block (OB121) ............................................. 1-3
1.28 I/O Access Error Organization Block (OB122) ................................................. 1-3
2 Common Parameters for SFCs 2-3
2.1 Evaluating Errors with Output Parameter RET_VAL........................................ 2-3
2.2 Meaning of the Parameters REQ, RET_VAL and BUSY with Asynchronous
SFCs................................................................................................................. 2-3
3 Copy and Block Functions 3-3
3.1 Copying Memory Area with SFC 20 "BLKMOV"............................................... 3-3
3.2 Uninterruptible Copying of Variables with SFC 81 "UBLKMOV"...................... 3-3
3.3 Initializing a Memory Area with SFC 21 "FILL"................................................. 3-3
3.4 Creating a Data Block with SFC 22 "CREAT_DB" ........................................... 3-3
3.5 Deleting a Data Block with SFC 23 "DEL_DB"................................................. 3-3
Contents
System Software for S7-300/400 System and Standard Functions - Volume 1/2
x A5E00709327-01
3.6 Testing a Data Block with SFC 24 "TEST_DB"................................................ 3-3
3.7 Compressing the User Memory with SFC 25 "COMPRESS"........................... 3-3
3.8 Transferring a Substitute Value to Accumulator 1 with SFC 44 "REPL_VAL" . 3-3
3.9 Generating Data Blocks in Load Memory with SFC 82 "CREA_DBL" ............. 3-3
3.10 Reading from a Data Block In Load Memory with SFC 83 "READ_DBL" ........ 3-3
3.11 Writing a Data Block in Load Memory with SFC 84 "WRIT_DBL".................... 3-3
3.12 Creating a Data Block with SFC 85 "CREA_DB" ............................................. 3-3
4 SFCs for Controlling Program Execution 4-3
4.1 Re-triggering Cycle Time Monitoring with SFC 43 "RE_TRIGR" ..................... 4-3
4.2 Changing the CPU to STOP with SFC 46 "STP".............................................. 4-3
4.3 Delaying Execution of the User Program with SFC 47 "WAIT"........................ 4-3
4.4 Triggering a Multicomputing Interrupt with SFC 35 "MP_ALM"........................ 4-3
4.5 Controlling CiR with SFC 104 "CiR" ................................................................. 4-3
5 SFCs for Handling the System Clock 5-3
5.1 Setting the TOD with SFC 0 "SET_CLK".......................................................... 5-3
5.2 Reading the Time with SFC 1 "READ_CLK".................................................... 5-3
5.3 Synchronizing Slave Clocks with SFC 48 "SNC_RTCB" ................................. 5-3
5.4 Setting the Time-of-Day and the TOD Status with SFC 100 "SET_CLKS"...... 5-3
6 SFCs for Handling Run-Time Meters 6-3
6.1 Runtime Meters ................................................................................................ 6-3
6.2 Handling Runtime meters with SFC 101 "RTM"............................................... 6-3
6.3 Setting the Runtime Meter with SFC 2 "SET_RTM"......................................... 6-3
6.4 Starting and Stopping a Run-time Meter with SFC 3 "CTRL_RTM"................. 6-3
6.5 Reading a Runtime Meter with SFC 4 "READ_RTM" ...................................... 6-3
6.6 Reading the System Time with SFC 64 "TIME_TCK" ...................................... 6-3
7 SFCs/SFBs for Transferring Data Records 7-3
7.1 Writing and Reading Data Records.................................................................. 7-3
7.2 Reading Defined Parameters with SFC 54 "RD_DPARM"............................... 7-3
7.3 Reading Predefined Parameters with SFC 102 "RD_DPARA" ........................ 7-3
7.4 Writing Dynamic Parameters with SFC 55 "WR_PARM" ................................. 7-3
7.5 Writing Default Parameters with SFC 56 "WR_DPARM" ................................. 7-3
7.6 Assigning Parameters to a Module with SFC 57 "PARM_MOD" ..................... 7-3
7.7 Writing a Data Record with SFC 58 "WR_REC" .............................................. 7-3
7.8 Reading a Data Record with SFC 59 "RD_REC"............................................. 7-3
7.9 Further Error Information for SFCs 55 to 59..................................................... 7-3
7.10 Reading Predefined Parameters with SFB 81 "RD_DPAR"............................. 7-3
8 DPV1 SFBs According to PNO AK 1131 8-3
8.1 Reading a Data Record with SFB 52 "RDREC"............................................... 8-3
8.2 Writing a Data Record with SFB 53 "WRREC"................................................. 8-3
8.3 Receiving an Interrupt with SFB 54 "RALRM".................................................. 8-3
8.4 Sending an Interrupt to the DP Master with SFB 75 "SALRM" ........................ 8-3
9 SFCs for Handling Time-of-Day Interrupts 9-3
9.1 Handling Time-of-Day Interrupts ...................................................................... 9-3
9.2 Characteristics of SFCs 28 to 31...................................................................... 9-3
9.3 Setting a Time-of-Day Interrupt with SFC 28 "SET_TINT"............................... 9-3
9.4 Canceling a Time-of-Day Interrupt with SFC 29 "CAN_TINT" ......................... 9-3
9.5 Activating a Time-of-Day Interrupt with SFC 30 "ACT_TINT" .......................... 9-3
9.6 Querying a Time-of-Day Interrupt with SFC 31 "QRY_TINT"........................... 9-3
Contents
System Software for S7-300/400 System and Standard Functions
A5E00709327-01 xi
10 SFCs for Handling Time-Delay Interrupts 10-3
10.1 Handling Time-Delay Interrupts...................................................................... 10-3
10.2 Starting a Time-Delay Interrupt with SFC 32 "SRT_DINT" ............................ 10-3
10.3 Querying a Time-Delay Interrupt with SFC 34 "QRY_DINT".......................... 10-3
10.4 Canceling a Time-Delay Interrupt with SFC 33 "CAN_DINT" ........................ 10-3
11 SFCs for Handling Synchronous Errors 11-3
11.1 Masking Synchronous Errors ......................................................................... 11-3
11.2 Masking Synchronous Errors with SFC 36 "MSK_FLT"................................. 11-3
11.3 Unmasking Synchronous Errors with SFC 37 "DMSK_FLT".......................... 11-3
11.4 Reading the Error Register with SFC 38 "READ_ERR"................................. 11-3
12 SFCs for Handling Interrupts and Asynchronous Errors 12-3
12.1 Delaying and Disabling Interrupt and Asynchronous Errors........................... 12-3
12.2 Disabling the Processing of New Interrupts and Asynchronous Errors
with SFC 39 "DIS_IRT"................................................................................... 12-3
12.3 Enabling the Processing of New Interrupts and Asynchronous Errors
with SFC 40 "EN_IRT".................................................................................... 12-3
12.4 Delaying the Processing of Higher Priority Interrupts and
Asynchronous Errors with SFC 41 "DIS_AIRT".............................................. 12-3
12.5 Enabling the Processing of Higher Priority Interrupts and
Asynchronous Errors with SFC 42 "EN_AIRT"............................................... 12-3
13 SFCs for Diagnostics 13-3
13.1 System Diagnostics ........................................................................................ 13-3
13.2 Reading OB Start Information with SFC 6 "RD_SINFO"................................ 13-3
13.3 Reading a System Status List or Partial List with SFC 51 "RDSYSST"......... 13-3
13.4 Writing a User-Defined Diagnostic Event to the Diagnostic Buffer with
SFC 52 "WR_USMSG"................................................................................... 13-3
13.5 Determining the OB Program Runtime with SFC 78 "OB_RT" ...................... 13-3
13.6 Diagnosis of the Current Connection Status with SFC 87 "C_DIAG" ............ 13-3
13.7 Identifying the Bus Topology of a DP Master System with SFC 103
"DP_TOPOL" .................................................................................................. 13-3
14 SFCs and SFBs for Updating the Process Image and Processing Bit Fields 14-3
14.1 Updating the Process Image Input Table with SFC 26 "UPDAT_PI" ............. 14-3
14.2 Updating the Process Image Output Table with SFC 27 "UPDAT_PO" ........ 14-3
14.3 Updating the Process Image Partition Input Table in a
Synchronous Cycle with SFC 126 "SYNC_PI"............................................... 14-3
14.4 Updating the Process Image Partition in a Synchronous Cycle
with SFC 127 "SYNC_PO" ............................................................................. 14-3
14.5 Setting a Bit Field in the I/O Area with SFC 79 "SET".................................... 14-3
14.6 Resetting a Bit Field in the I/O Area with SFC 80 "RSET" ............................. 14-3
14.7 Implementing a Sequencer with SFB 32 "DRUM".......................................... 14-3
15 System Functions for Addressing Modules 15-3
15.1 Querying the Logical Base Address of a Module with
SFC 5 "GADR_LGC" ...................................................................................... 15-3
15.2 Querying the Module Slot Belonging to a Logical Address with
SFC 49 "LGC_GADR" .................................................................................... 15-3
15.3 Querying all Logical Addresses of a Module with SFC 50 "RD_LGADR" ...... 15-3
15.4 Determining the Start Address of a Module with SFC 70 "GEO_LOG" ......... 15-3
15.5 Determining the Slot Belonging to a Logical Address with
SFC 71 "LOG_GEO" ...................................................................................... 15-3
Contents
System Software for S7-300/400 System and Standard Functions - Volume 1/2
xii A5E00709327-01
16 SFCs for Distributed I/Os or PROFINET IO 16-3
16.1 Triggering a Hardware Interrupt on the DP Master with SFC 7 "DP_PRAL" . 16-3
16.2 Synchronizing Groups of DP Slaves with SFC 11 "DPSYC_FR"................... 16-3
16.3 Deactivating and Activating DP Slaves/PROFINET IO Devices
with SFC 12 "D_ACT_DP".............................................................................. 16-3
16.4 Reading Diagnostic Data of a DP Slave with SFC 13 "DPNRM_DG"
(Slave Diagnostics)......................................................................................... 16-3
16.5 Reading Consistent Data of a DP Standard Slave//PROFINET IO Device
with SFC 14 "DPRD_DAT"............................................................................. 16-3
16.6 Writing Consistent Data to a DP Standard Slave/PROFINET IO Device
with SFC 15 "DPWR_DAT" ............................................................................ 16-3
17 PROFInet 17-3
17.1 Background Information on SFCs 112, 113 and 114 ..................................... 17-3
17.2 Updating the Inputs of the User Program Interface for the
PROFInet Component with SFC 112 "PN_IN" ............................................... 17-3
17.3 Updating the Outputs of the PROFInet Interface for the
PROFInet Component with SFC 113 "PN_OUT" ........................................... 17-3
17.4 Updating DP Interconnections with SFC 114 "PN_DP" ................................. 17-3
18 FBs for Cyclical Access to User Data according to the PNO 18-3
18.1 Introduction to the FBs for Cyclical Access to User Data according
to the PNO ...................................................................................................... 18-3
18.2 Read All Inputs of a DP Standard Slave/PROFINET IO Device with
FB 20 "GETIO" ............................................................................................... 18-3
18.3 Write All Outputs of a DP Standard Slave/PROFINET IO Device with
FB 21 "SETIO"................................................................................................ 18-3
18.4 Read a Part of the Inputs of a DP Standard Slave/PROFINET IO Device
with FB 22 "GETIO_PART" ............................................................................ 18-3
18.5 Write a Part of the Outputs of a DP Standard Slave/PROFINET IO Device
with FB 23 "SETIO_PART"............................................................................. 18-3
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01 1-1
1 Organization Blocks
1.1 Overview of the Organization Blocks (OBs)
What Are Organization Blocks?
Organization Blocks (OBs) are the interface between the operating system of the
CPU and the user program. OBs are used to execute specific program sections:
• At the startup of the CPU
• In a cyclic or clocked execution
• Whenever errors occur
• Whenever hardware interrupts occur.
Organization blocks are executed according to the priority they are allocated.
Which OBs Are Available?
Not all CPUs can process all of the OBs available in STEP 7. Refer to Operations
lists /72/ and /102/ to determine which OBs are included with your CPU.
Organization Blocks
System Software for S7-300/400 System and Standard Functions - Volume 1/2
1-2 A5E00709327-01
Where to Find More Information?
Refer to the online help and the following manuals for more information:
• /70/: this manual contains the technical data that describe the capabilities of the
different S7-300 CPUs.
• /101/: this manual contains the technical data that describe the capabilities of
the different S7-400 CPUs.
The following table contains the start event belonging to each OB as well as the
default priority class.
OB Start Event Default Priority
Class
Explanation
OB1 End of startup or end of OB1 1 Free cycle
OB10
OB11
OB12
OB13
OB14
OB15
OB16
OB17
Time-of-day interrupt 0
Time-of-day interrupt 1
Time-of-day interrupt 2
Time-of-day interrupt 3
Time-of-day interrupt 4
Time-of-day interrupt 5
Time-of-day interrupt 6
Time-of-day interrupt 7
2
2
2
2
2
2
2
2
No default time
specified
OB20
OB21
OB22
OB23
Time-delay interrupt 0
Time-delay interrupt 1
Time-delay interrupt 2
Time-delay interrupt 3
3
4
5
6
No default time
specified
OB30
OB31
OB32
OB33
OB34
OB35
OB36
OB37
OB38
Cyclic interrupt 0 (default interval: 5 s)
Cyclic interrupt 1 (default interval: 2 s)
Cyclic interrupt 2 (default interval: 1 s)
Cyclic interrupt 3 (default interval: 500 ms)
Cyclic interrupt 4 (default interval: 200 ms)
Cyclic interrupt 5 (default interval: 100 ms)
Cyclic interrupt 6 (default interval: 50 ms)
Cyclic interrupt 7 (default interval: 20 ms)
Cyclic interrupt 8 (default interval: 10 ms)
7
8
9
10
11
12
13
14
15
Cyclic interrupts
OB40
OB41
OB42
OB43
OB44
OB45
OB46
OB47
Hardware interrupt 0
Hardware interrupt 1
Hardware interrupt 2
Hardware interrupt 3
Hardware interrupt 4
Hardware interrupt 5
Hardware interrupt 6
Hardware interrupt 7
16
17
18
19
20
21
22
23
Hardware interrupts
OB55 Status interrupt 2 DPV1 interrupts
OB56 Update interrupt 2
OB57 Manufacturer specific interrupt 2
OB60 SFC35 "MP_ALM" call 25 Multicomputing
interrupt
Organization Blocks
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01 1-3
OB Start Event Default Priority
Class
Explanation
OB 61
OB 62
OB 63
OB 64
Synchronous Cycle Interrupt 1
Synchronous Cycle Interrupt 2
Synchronous Cycle Interrupt 3
Synchronous Cycle Interrupt 4
25
25
25
25
Synchronous Cycle
Interrupt
OB 65 Technology synchronization interrupt 25 Technology
synchronization
interrupt
OB70
OB72
OB 73
I/O redundancy error (only in H CPUs)
CPU redundancy error (only in H CPUs)
Communication redundancy error OB (only in
H CPUs)
25
28
25
Redundancy error
interrupts
OB80 Time error 26, 28 1) Asynchronous error
interrupts
OB81 Power supply fault 26, 28 1) with S7-300,
25, 28 1) with S7-400
and CPU 318
OB82 Diagnostic interrupt 26, 28 1) with S7-300,
25, 28 1) with S7-400
and CPU 318
OB83 Insert/remove module interrupt 26, 28 1) with S7-300,
25, 28 1) with S7-400
and CPU 318
OB84 CPU hardware fault 26, 28 1) with S7-300,
25, 28 1) with S7-400
and CPU 318
OB85 Program error 26, 28 1) with S7-300,
25, 28 1) with S7-400
and CPU 318
OB86 Failure of an expansion rack, DP master
system or station for distributed I/Os
26, 28 1) with S7-300,
25, 28 1) with S7-400
and CPU 318
OB87 Communication error 26, 28 1) with S7-300,
25, 28 1) with S7-400
and CPU 318
OB 88 Processing interrupt 28
OB90 Warm or cold restart or delete a block being
executed in OB90 or load an OB90 on the
CPU or terminate OB90
29 2) Background cycle
OB100
OB101
OB102
Warm restart
Hot restart
Cold restart
27 1)
27 1)
27 1)
Startup
OB121
OB122
Programming error
I/O access error
Priority of the OB
causing the error
Priority of the OB
causing the error
Synchronous error
interrupts
1) Priority classes 27 and 28 are valid in the priority class model of the startup. 2) Priority class 29 corresponds to priority 0.29. This means that the background cycle has lower
priority than the free cycle.