Download "user manual"

Transcript
Organization Blocks and Executing the Program
3.1
Types of Organization Block
Overview
STEP 7 provides you with various types of organization block (OB) with
which you can adapt the program to the requirements of your process, as
follows.
S Using the startup OBs, you can decide the conditions under which the
programmable logic controller goes through a complete restart or a
restart.
S With some of the OBs, you can execute a program at a certain point in
time or at certain intervals.
S Other OBs react to interrupts or errors detected by the CPU.
Priority
Organization blocks determine the order in which the individual program
sections are executed. The execution of an OB can be interrupted by calling a
different OB. Which OB is allowed to interrupt another OB depends on its
priority. Higher priority OBs can interrupt lower priority OBs. The lowest
priority is 1. The background OB has the lowest priority, namely 0.29.
Types of Interrupt
and Organization
Blocks
The events that lead to an OB being called are known as interrupts. Table 3-1
shows the types of interrupt in STEP 7 and the priority of the organization
blocks assigned to them. Not all S7 CPUs have the complete range of
organization blocks and priority classes listed in the table below (see CPU
descriptions /70/ and /101/).
Table 3-1
Types of Interrupt and Priority Classes
Organization Blocks
Type of Interrupt
3-2
Priority Class
Main program scan
OB1
1
Time-of-day interrupts
OB10 to OB17
2
Time-delay interrupts
OB20
OB21
OB22
OB23
3
4
5
6
Cyclic interrupts
OB30
OB31
OB32
OB33
OB34
OB35
OB36
OB37
OB38
7
8
9
10
11
12
13
14
15
System Software for S7-300 and S7-400 Program Design
C79000-G7076-C506-01