Documentos de Académico
Documentos de Profesional
Documentos de Cultura
FC
FB
OB1
Operating
system
FB
FC
SFC
SFB
Other
OBs
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.1
Objectives
g
blocks that are available
know the organization
...
...
p
the p
principle
p of interrupt
p p
processing
g
be able to explain
...
...
y
and asynchronous
y
errors and
know the error OBs for synchronous
will be able to implement them to influence the CPU response when
errors occur
...
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.2
P i di
Periodic
program
execution
E
Event-driven
tdi
program
execution
OB 10 to 17
(Time-of-day
interrupts)
OB 30 to 38
(Cyclic interrupts)
OB 20 to
t 23
(Time-delay interrupts)
OB 80 to
t 87
OB 40 to 47
(Hardware interrupts)
OB 121, 122
Interrupt OBs
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.3
(Asynchronous errors)
(Synchronous errors)
Error OBs
Startup OBs
CPU in the STOP state
(Peripheral modules have switched all outputs to the safe state)
Restart (manual)
Completer Restart
automatic
manual
S7-300/400 S7-300
Power ON STOP->RUN
S7-400
Execute OB 101
STOP->RUN
+ CRST
Delete the p
process images,
g ,
non-retentive M, T, C
Output
O
t t PIQ
Enable outputs
C
Y
C
L
E
Output PIQ
Enable outputs
Execute OB1
C
Y
C
L
E
Output PIQ
STOP
no
Read in PII
SIMATIC S7
yes
Date:
File:
26.10.2008
PRO1_12E.4
Read in PII
Execute OB1
Output PIQ
Such as OB82
(Prio.26) = Error
h dli
handling.
E
Executed
t d iin
event of wire break at
a analog input PIW 352
SIMATIC S7
Siemens AG 2002. All rights reserved.
OB1
is
executed
continuously .....
Such as OB10
(Prio.2) = Time-ofday interrupt.
Executed once a
minute from 9:30
Date:
File:
26.10.2008
PRO1_12E.5
OB Type
Cyclic program
Time-of-day interrupt
Time-delay interrupt
Cyclic interrupt
Hardware interrupt
Error handling
Priority
1
2
3
12
16
26 / 28
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.6
RUN
OB35
Interval
OB1
SIMATIC S7
Siemens AG 2002. All rights reserved.
OB1
OB35
Interval
B1
OB1
Date:
File:
OB35
Interval
OB1
26.10.2008
PRO1_12E.7
OB1
Prio 12
OB1
B1
Prio 1
HW Config:
Analog input
module properties
CPU
properties
+27648
Upper limit
value
Lower limit
value
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.8
I 0.0
M0.1
(P)
SIMATIC S7
Siemens AG 2002. All rights reserved.
SFC 32
(SRT_DINT)
EN
20
OB_NR
T#500ms
DTIME
W#16#01
SIGN
Date:
File:
M2.0
RET VAL
RET_VAL
26.10.2008
PRO1_12E.9
( )
ENO
MW10
CPU
properties
Wirebreak
+27648
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.10
Type of error
Example
OB
Priority
Time error
OB80
26
OB81
Diagnostic interrupt
OB82
Insert / remove
interrupt
OB83
OB84
OB85
Rack fault
OB86
Communication error
OB87
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.11
26 / 28
Synchronous Errors
Type of error
Example
OB
Programming error
OB121
Access error
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.12
OB122
Priority
Same as that
of the OB
interrupted
as a result of
th error
the
Organization block
Function
Number
Priority
in S7-300
SFCs for
controlling OBs
Remarks
HW Config alternative
Time-of-day interrupt OB 10 to 17
SFC 28 to 31
Cyclic interrupt
OB 30 to 38
12
none
OB 20 to 23
SFC32 to 34
Hardware interrupt
OB 40 to 47
16
none
Diagnostic interrupt
OB 81 to 87
26
none
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.13
Mandatory
OB Start Information
L-Byte
0/1
Start event
Consecutive number
2/3
Priority
OB No.
4/5
6/7
Additional info 1
8/9
Additional info 2
10 / 11
Additional info 3
12 / 13
Year
Month
14 / 15
D
Day
H
Hours
16 / 17
Minutes
Seconds
18 / 19
1/10 Second,
Second 1/100 Second
1 /1000 Second,
Second Weekday
SIMATIC S7
Siemens AG 2002. All rights reserved.
Date:
File:
26.10.2008
PRO1_12E.14
Management
information
Start
information
Start
time
DI
I 0.0
T_System_ON
I 0.1
01
T S t
T_System_OFF
OFF
I 0.2
I 0.3
I 0.4
S_M/A_ModeSelect
I 0.5
05
T M/A Accept
T_M/A_Accept
I 0.6
Qty./ Weight
L_SYSTEM
.1
1
T_Jog_RT
L_MAN
T_Jog_LT
L_AUTO
.2
.3
man.Rest.
man
Rest
auto.Rest.
I 1.0
T_Fault_Rst
.0
I 1.1
S_Fault1
S_Fault2
L_Fault2
S_Fault3
L_Fault3
I 1.5
15
.5
5
I 1.6
.6
I 1.7
.7
AO1
-15V...+15V
AO2
AI1
.2
.3
.4
AI2
AI1
.1
I 1.4
-15V...+15V
.6
.7
L_Fault1
QW 12 / QW 6
.5
5
Ack_Restart
SIMATIC S7
.4
I 0.7
I 1.2
I 1.3
AI2
0 8 1 5
AI1
AI2
AO1
AO2
IW 4 / IW 2
Date:
File:
26.10.2008
PRO1_12E.15
CPU Program
CPU Response...
with OB121
SIEMENS
CPU314
Synchronous error
BCD
thumbwheel
button
DC5V
RUN
STOP
cont.
light
RUN-P
RUN
Setpoint number of
parts
0 2 81
7
SF
flashes
for
moment
STOP
02 I 1
IW 4 / IW 2
w/o OB121
SIEMENS
CPU314
Value at
moment
of
switch-over
SF
DC5V
RUN
STOP
Synchronous error
RUN-P
RUN
STOP
SIMATIC S7
Siemens AG 2002. All rights reserved.
cont.
light
Date:
File:
26.10.2008
PRO1_12E.16
cont.
light