SCE en 030-040 R1209 ErweiterteDiagnose
SCE en 030-040 R1209 ErweiterteDiagnose
SCE en 030-040 R1209 ErweiterteDiagnose
Page 1 of 33
Advanced training
Please get in touch with your regional SCE contact for information on regional Siemens SCE advanced training
siemens.com/sce/contact
Page 2 of 33
Preface ....................................................................................................................................................... 4
Notes on programming the SIMATIC S7-300 ............................................................................................. 6
SIMATIC S7-300 automation system ......................................................................................................... 6
2.2
3.1
3.2
Asynchronous errors................................................................................................................................... 8
3.
4.
5.
6.
Page 3 of 33
1.
Preface
The SCE_EN_030-040 module contents form part of the 'Advanced functions for PLC programming'
training unit and explain how organization blocks are used for error handling in SIMATIC S7. Additional
functions for error diagnostics, such as the Web server integrated in CPU 315F-2 PN/DP, are presented.
Basics of PLC
programming
Module 10, Module 20
Plant simulation with
SIMIT Module 150
Advanced functions for
PLC programming
Module 30
Other programming
languages
Module 40
Safety technology
Module 80
PROFIBUS
Module 60
Sensor technology
Module 110
PROFINET
Module 70
AS interface
Module 50
Process visualization
(HMI) Module 90
Drive technology
Module 100
Learning objective:
This module describes the use of the various organization blocks with SIMATIC S7. For this purpose an
error is added to the project 'DB_Lager' from the module SCE_EN_030-030_R1201__data blocks in
order to illustrate the options for error handling.
A diagnostics-capable module is also used to diagnose hardware faults. The error is displayed in the
integrated Web server of the CPU 315F-2 PN/DP.
Organization blocks for error handling Notes on programming in the SIMATIC S7-300
Error diagnostics using the TIA Portal
System diagnostics with SIMATIC S7-300
Integrated Web server of the CPU 315F-2 PN/DP
Requirements:
To successfully work through this module, the following knowledge is required:
Basic information on PLC programming with the TIA Portal and information on block types of the
S7-300 and data blocks. (for example, module SCE_EN_020-010_R1110_Startup Programming
SIMATIC S7-300, Module SCE_EN_030-010_R1201__Block types with SIMATIC S7-300 and
Module SCE_EN_030-030_R1201__Data blocks with SIMATIC S7-300)
Page 4 of 33
PC Pentium 4, 1.7 GHz 1 (XP) 2 (Vista) GB RAM, approx. 2 GB of free hard disk space
Operating system Windows XP Professional SP3 / Windows 7 Professional / Windows 7
Enterprise / Windows 7 Ultimate / Windows 2003 Server R2 / Windows Server 2008 Premium SP1,
Business SP1, Ultimate SP1
Software: STEP 7 Professional V11 (Totally Integrated Automation (TIA) Portal V11)
SIMATIC S7-300 PLC, e.g., CPU 315F-2PN/DP with 16DI/16DO signal module. The inputs must be
fed out to a control panel.
Digital input module 16DI with process and diagnostic error interrupt
2 STEP 7 Professional
V11 (TIA Portal)
1 PC
3 Ethernet connection
Page 5 of 33
2.1
2.2
SIMATIC S7-1200
SIMATIC S7-300
SIMATIC S7-400
SIMATIC WinAC
STEP 7 Professional V11 provides the following functions for plant automation:
-
Programming
Documentation
Creation of visualizations for SIMATIC Basic Panels using the integrated WinCC Basic software.
Visualization solutions for PCs and other panels can also be created with other WinCC software
packages
Page 6 of 33
3.1
Synchronous errors
Synchronous errors are determined directly during the processing of an instruction. If, for example,
access to a DB2 data block is programmed in the program and if the block is not available in the CPU, a
synchronous error has occurred.
With such a programming error, the organization block OB121 is called; if this is not available the CPU
goes to STOP and the red SF LED (group error) lights up.
An access error is triggered by a direct access to a defect or non-available module.
This happens, for example, if a faulty address is programmed for the access to an analog input is
programmed via peripheral input and outputs (see module SCE_EN_030-050_R1201_Analog value
processing with SIMATIC S7-300) an incorrect address is programmed.
The operating system calls OB 122 when there is an access error; if this OB is not available the CPU
goes to STOP.
Page 7 of 33
3.2
Asynchronous errors
Asynchronous errors cannot be assigned to any specific program position as these are triggered by
failures and faults in the hardware used.
In other words, they occur asynchronously to the program processing.
Examples of asynchronous errors are:
Type of error:
Examples:
Error OB:
Time error
OB 80
OB 82
OB 85
Remove/insert interrupt
Program execution error
Rack failure (S7-400 only)
Communications errors
OB 83
OB 86
OB 87
Note: Additional information regarding asynchronous errors is available in the online help of the TIA
Portal.
Page 8 of 33
The central tool is the 'Totally Integrated Automation Portal', which is opened here with a
double-click. ( Totally Integrated Automation Portal V11)
2.
Open the 'DB_Store' project from the SCE_EN_030_030 module in the portal view as a
template for this program. ( Open existing project DB_Store Open)
Page 9 of 33
'First steps' for configuring are now suggested. We want to 'Open the project view'. ( Open
the project view)
4.
Start by saving the project under a different name. ( Project Save as)
Page 10 of 33
6.
To make the changes, double-click the 'Main [OB1]' block to open it. ( Main [OB1])
Page 11 of 33
Page 12 of 33
To load your entire program to the CPU, first select the 'PLC_1 [CPU 315F-2 PN/DP]' folder and
then click the Download to device icon
Page 13 of 33
If you forgot to specify the PG/PC interface beforehand, a window appears where it can be
specified. ( PG/PC interface for loading Load)
Page 14 of 33
11. The successful load result is now displayed in a window. Now click 'Finish'. This will also restart
the CPU. ( Finish)
Page 15 of 33
, you can connect the TIA Portal with the CPU for the
)
Page 16 of 33
Note: The CPU goes to STOP here, as the requested program error OB121 is not available in the
CPU.
Page 17 of 33
Page 18 of 33
' this empty organization block PROG_ERR [OB 121] into the controller.
16. Then, click 'Load' again. The status of the load operation will be displayed in a window.
( Load)
Page 19 of 33
18. Now, despite the error, the CPU does not go to STOP. However, two entries are written to the
'Diagnostics buffer' during each processing cycle, as DB2 is missing and there is therefore
also no access to the data word 0 in this DB. The diagnostics LED SF is still lit up red.
( PLC_1 [CPU 315F-2 PN/DP] Online & Diagnostics Diagnostics Diagnostics buffer)
Page 20 of 33
Configuring Web server and system diagnostics for the CPU 315F-2 PN/DP
The system diagnostics function in the hardware configuration of the CPU can be used to create the
fault organization blocks to the asynchronous errors and to automatically generate error messages to
the hardware faults.
These messages can be viewed conveniently in the Web server along with other information using
the integrated Web server of the CPU 315F-2 PN/DP.
In the following section the system diagnostics will be activated for the CPU 315F-2 PN/DP and the
Web browser created:
1.
First we want to create a 'WatchTable_Store', in order to view this as well in the Web browser
later. For more information on the watch and force tables, refer to the module
SCE_EN_020_060. (PLC_1 [CPU 315F-2 PN/DP] Watch and force tables
WatchTable_Store "DB_StoreAssignment.LP1" "DB_StoreAssignment.LP8")
Page 21 of 33
We open the 'Device configuration' and activate the 'Web server' there in the properties of the
CPU 315F-2 PN/DP. (PLC_1 [CPU 315F-2 PN/DP] Device configuration
PLC_1 [CPU 315F-2 PN/DP] Properties General Web server
server on this module)
3.
Activate Web
It is generally true that remote access to a PLC represents a security risk. Take this into
consideration in your network structure; for example, set a firewall to ensure that only authorized
persons have access and then confirm the security prompt. ( OK)
Page 22 of 33
Then activate system diagnostics. The information from the system diagnostics can also be
displayed in the Web server. ( Yes)
5.
Numerous properties have to be set for the Web server. Here we activate the 'automatic
update' and 'English' as language for the Web server. English is then also assigned as
'Project language'. ( Automatic update
Project language: English)
Page 23 of 33
Activate Languages
English
In the item 'Watch tables' we enter our previously created 'WatchTable_Store'. ( Watch
tables WatchTable_Store
7.
We leave the defaults in place in the details to the properties of the 'System diagnostics'. We
compile the changes in our station 'PLC_1Conveyor [CPU 315F-2 PZN/DP]'. We can see
the created OBs in the Program blocks folder.
(System diagnostics PLC_1Conveyor [CPU 315F-2 PN/DP]
Page 24 of 33
Program blocks)
To be able to simulate hardware faults in our station, we enter an additional signal module 'DI16
x DC24V, Alarm', which supports hardware and diagnostic error interrupts, in the 'Device
configuration'. ( PLC_1 [CPU 315F-2 PN/DP] Device configuration
DI DI16 x DC24V, Interrupt 6ES7 321-7BH01-0AB0)
Note: With this module, we can very simply simulate a hardware error by removing the 24V power
supply.
Page 25 of 33
In the activities of this module 'DI16 x DC24V, Alarm' we activate the option 'Diagnostic error
interrupt'. To load your entire program to the CPU now, first select the 'PLC_1 [CPU 315F-2
PN/DP]' folder and then click the Download to device icon
Properties Inputs
10. Then, click 'Load' again. The status of the load operation will be displayed in a window.
( Load)
Page 26 of 33
Page 27 of 33
In the following section you will learn how to access the standard pages of the CPU 315F-2 PN/DP
via the Web.
1.
To be able to access the Web server of the CPU 315F-2 PN/DP we open any Web browser on a
PC that is connected via TCP/IP with the CPU.
2.
Page 28 of 33
First, select the language on the displayed Web page, then ENTER'. ( English ENTER)
4.
On the 'Home page' we get general information on the PLC and its status. ( Home page)
Page 29 of 33
Hardware, firmware version and serial numbers are displayed beside other information at
'Identification'. ( Identification)
6.
At 'Diagnostics buffer' you obtain reliable information on all events in the CPU. Event
messages are registered in a cyclic buffer. The most recent alarm is displayed in the top line.
( Diagnostics buffer)
Note: Here we see our cyclically occurring programming error in the OB1.
Page 30 of 33
The status of the individual modules of our SIMATIC S7-300 is displayed with additional details
in the 'Module status' view. ( Module status)
8.
The alarm texts generated in the CPU 315F-2 PN/DP are available in 'Alarms'.
( Alarms)
Note: Here we see the failure of the power supply on the digital input module 16DI with activated
diagnostic error interrupt. This alarm only appears if the hardware configuration of the
CPU 315F-2 PN/DP was activated in system diagnostics.
Page 31 of 33
10. Devices that are connected to the individual ports of the CPU 315F-2 PN/DP and the addresses
of these devices can be displayed under 'Topology'. There are various views for this. In the
case of larger network structures the entire network structure of a plant can be displayed and
faulty connections shown in the status provided this function is supported by the individual
components. ( Topology Graphic view)
Page 32 of 33
12. 'Tag tables' such as the 'WatchTable_Store', which are linked with the Web server, can also
be displayed. Individually created pages to visualize and also to operate processes can be
viewed under 'User pages'. ( Tag tables WatchTable_Store)
Page 33 of 33