Technical data

Basics of Designing a Program Structure
4.2 Blocks in the User Program
Programming with STEP 7
76 Manual, 05/2010, A5E02789666-01
Changing the Priority
Interrupts can be assigned parameters with STEP 7. With the parameter assignment you can for
example, deselect interrupt OBs or priority classes in the parameter blocks: time-of-day interrupts,
time-delay interrupts, cyclic interrupts, and hardware interrupts.
The priority of organization blocks on S7-300 CPUs is fixed.
With S7-400 CPUs (and the CPU 318) you can change the priority of the following organization
blocks with STEP 7:
OB10 to OB47
OB70 to OB72 (only H CPUs) and OB81 to OB87 in RUN mode.
The following priority classes are permitted:
Priority classes 2 to 23 for OB10 to OB47
Priority classes 2 to 28 for OB70 to OB72
Priority classes 24 to 26 for OB81 to OB87; for CPUs as of approx. The middle of 2001
(Firmware Version 3.0) the ranges where extended: Priority classes 2 to 26 can be set for OB
81 to OB 84 as well as for OB 86 and OB 87.
You can assign the same priority to several OBs. OBs with the same priority are processed in the
order in which their start events occur.
Error OBs started by synchronous errors are executed in the same priority class as the block being
executed when the error occurred.
Local Data
When creating logic blocks (OBs, FCs, FBs), you can declare temporary local data. The local data
area on the CPU is divided among the priority classes.
On S7-400, you can change the amount of local data per priority class in the "priority classes"
parameter block using STEP 7.
Start Information of an OB
Every organization block has start information of 20 bytes of local data that the operating system
supplies when an OB is started. The start information specifies the start event of the OB, the date
and time of the OB start, errors that have occurred, and diagnostic events.
For example, OB40, a hardware interrupt OB, contains the address of the module that generated
the interrupt in its start information.