128828581 Infoplc Net Sitrain 12 Obs
Transcript of 128828581 Infoplc Net Sitrain 12 Obs
Date: 2/8/2012 File: PRO1_12E.1
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Organization Blocks (1)
Operating
system
OB1
FC
FB
SFC
SFB
Other
OBs
FC
FB
System Functions
System Function Blocks
Date: 2/8/2012 File: PRO1_12E.2
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Objectives
Upon completion of the chapter the participant will ... ... know the purpose of temporary variables ... know the organization blocks that are available ... understand the difference between "Warm Restart", "Hot Restart" and "Cold Restart" ... be able to explain the principle of interrupt processing ... know the "Time-of-day Interrupt", "Cyclic Interrupt", "Hardware Interrupt" and "Diagnostic Interrupt" ... know and be able to use the error OBs ... be able to interpret the OB start information
Date: 2/8/2012 File: PRO1_12E.3
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
OB 10 to 17 (Time-of-day interrupts)
OB 80 to 87 (Asynchronous errors)
OB 20 to 23 (Time-delay interrupts)
Overview of the Organization Blocks
Periodic program execution
OB 30 to 38 (Cyclic interrupts)
Event-driven program execution
OB 40 to 47 (Hardware interrupts)
Startup
OB 102
OB 100
OB 101
Cyclic program execution
OB 1
OB 121, 122 (Synchronous errors)
Interrupt OBs Error OBs
Date: 2/8/2012 File: PRO1_12E.4
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Startup OBs for Warm Restart and Hot Restart
Read in PII
Execute OB1
Output PIQ
Delete the process images, Non-retentive M, T, C
Execute OB 100
Output PIQ Enable outputs
C Y C L E
Output PIQ Enable outputs
STOP yes
no
Monitoring time for hot restart exceeded ?
Delete PIQ (parameter-assignable)
Process residual scan cycle
Execute OB 101
Output PIQ
Hot Restart (only S7-400)
CPU in the STOP state (Peripheral modules have switched all outputs to the save state)
Warm Restart
automatic manual
S7-300 / 400
Power ON
S7-300
STOPRUN
S7-400
STOPRUN + CRST
Execute OB1
Read in PII C Y C L E
automatic ( HW Config)
manual
Power ON STOPRUN+WRST
Date: 2/8/2012 File: PRO1_12E.5
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Startup OB for Cold Restart
Cold Restart
Read in PII
Execute OB1
Output PIQ
Output PIQ Enable outputs
C Y C L E
automatic
Power ON
CPU 318-2 e.g. CPU 416-2
Execute OB 102
Delete the process images, all M, T, C
Initialize the data blocks
Date: 2/8/2012 File: PRO1_12E.6
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Such as OB82
(Prio.26) = Error
handling. Executed in
event of wire break at
analog input PIW 352
Such as OB10
(Prio.2) = Time-of-
day interrupt.
Executed once a
minute from 9:30 OB1
is
executed
continu-
ously .....
OB 1
3
Time-of-day interrupt
Cyclic interrupt
1
16
Error handling
Cyclic Program
Time-delay interrupt
Hardware interrupt
2
12
25 / 28
OB 20
OB 40
OB 10
OB 35
OB 82
OB No. OB Type Priority
Such as OB20 (Prio.3)
= Time-delay interrupt.
Execution starts 3.25
seconds after a part is
detected.
Interrupting the Cyclic Program
...... until it is interrupted
by another OB
Date: 2/8/2012 File: PRO1_12E.7
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Time-of-Day Interrupt (OB 10)
Date: 2/8/2012 File: PRO1_12E.8
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Cyclic Interrupt (OB 35)
RUN OB35 OB35 OB35 Interval
O OB1 B1 OB1 OB1 OB1 OB1 OB1 O B1 Prio 1
Prio 12 Interval Interval
Date: 2/8/2012 File: PRO1_12E.9
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Hardware Interrupt (OB 40)
Upper limit value Lower limit value
Hardware Configuration Analog input
properties
+27648
0
CPU properties
Analog input module
Date: 2/8/2012 File: PRO1_12E.10
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
OB Start Information using OB100 as an Example
4 / 5
6 / 7
8 / 9
10 / 11
Reserved
Number of the event that caused the CPU to go into STOP
Additional information on the current startup???
Address
0 / 1
2 / 3
Start event
Priority
Start-up request
OB No.
12 / 13
14 / 15
16 / 17
18 / 19
Year
Day
Minutes
1/10 seconds, 1/100 seconds
Month
Hours
Seconds
1 /1000 seconds, weekday
Date: 2/8/2012 File: PRO1_12E.11
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Ex. 1: Displaying the Startup Type (OB100) and Acknowledging It
DI
I 0.1
I 0.2
I 0.3
I 0.4
I 0.5
L_SYSTEM
L_MAN
L_AUTO
Q 4.1
Q 4.2
Q 4.3
I 0.0
T_Ackn_Fault
S_Fault1
S_Fault2
L_Fault1
L_Fault2
I 1.0
I 1.1
I 1.2
Q 5.1
Q 5.2
DO
S_Fault3 L_Fault3 I 1.3 Q 5.3
L_Restart_man
L_Restart_aut
Q 4.5
Q 4.6
L_Conv_Fault Q 5.0
Date: 2/8/2012 File: PRO1_12E.12
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Asynchronous Errors
Type of error Example OB
Time error Maximum scan cycle time exceeded OB80
25 / 28
Priority
25
Power supply fault Backup battery failure OB81
Diagnostic interrupt Wirebreak at input of diagnostics-capable module
OB82
Insert / remove interrupt
Removal of a signal module during operation of an S7-400™
OB83
CPU hardware fault
Incorrect signal level at the MPI interface
OB84
Program execution error Error in updating the process image (module defective)
OB85
Rack fault
Failure of an expansion device or a DP slave
OB86
Communication error Error in reading message frame OB87
Date: 2/8/2012 File: PRO1_12E.13
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Wirebreak
+27648
0
Diagnostic Interrupt (OB 82)
Hardware Configuration: Analog input
properties CPU properties
Analog input module
Date: 2/8/2012 File: PRO1_12E.14
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Synchronous Errors
Type of Error Example OB Priority
Same as that of the OB interrupted as a result of the error
Programming error A block that is not present in the CPU is called in the program
OB121
Access error
A module that is either defective or not present is addressed in the program (such as direct access to a non-existent I/O module)
OB122
Date: 2/8/2012 File: PRO1_12E.15
SIMATIC S7 Siemens AG 2006. All rights reserved.
SITRAIN Training for Automation and Industrial Solutions
Exercise 2: Response when a Slave Fails
CPU response...
...with OB 86
Asynchronous error
Continuous light
Continuous light
SIEMENS
SF
RUN
STOP
DC5V
...without OB 86
Asynchronous error
PROFIBUS slave failed
PROFIBUS slave failed
RUN
STOP
MRES
BF
Flashing light
Continuous light
Continuous light
SIEMENS
SF
RUN
STOP
DC5V
RUN
STOP
MRES
BF
Flashing light