You are on page 1of 46

Troubleshooting

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.1
System Diagnostics - Overview

CPU diagnostics detects CPU I/O-Module


a system error
CPU diagnostics detects Diagnostic Diagnostics-
an error in the user program interrupt capable module
detects an
error and
generates a
diagnostic
Error Diagnostic System interrupt
OB buffer status list

SFC
SIEMENS

CPU
messages
PG 740

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.2
Searching for Errors, that Cause the CPU to Stop

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.3
Calling the "Module Information" Tool

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.4
Module Information Tab: "Diagnostic Buffer"

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.5
Interpreting Error Messages

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.6
Opening a Block Containing an Error

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.7
Diagnostics with I Stack, B Stack, L Stack
Program structure Block containing error

Error location

You see the blocks


executed up to the error
in the B Stack.

Error location

You see the values of the


You see the contents of the temporary variables up to
accumulators, registers, status word
etc. (up to time of interruption) time of interruption in the L Stack.
in the I Stack.

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.8
B Stack

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.9
I Stack

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.10
L Stack

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.11
Exercise: Finding Stop Errors and Eliminating Them

Step What to Do Result

1 Carry out a CPU memory reset. The CPU memory is reset.


Copy the S7 program
"ERROR" from the project
2 The project structure is displayed.
"ERROR _16" ("ERROR _32") into the
HW-Station "My Station".
Download all the blocks from the
3 The faulty program is downloaded.
S7 program "ERROR" into the CPU.

4 Perform a complete restart. The CPU goes into STOP mode.

Find and eliminate the errors,


5 The CPU remains in RUN.
that lead to the Stop state.

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.12
Exercise: Troubleshooting with I Stack, B Stack

Step What to Do Result

Switch on the inputs I 1.0 to I 1.2


1 The CPU goes into STOP once more.
in sequence.
Clarify the cause of the error with the
Answer the questions in the table
2 help of the diagnostic buffer and the
below.
Stacks.

Switch the inputs I 1.0 to


3 The CPU remains in RUN.
I 1.2 off again.

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.13
Logical Errors

??

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.14
Displaying Reference Data

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.15
Filtering Reference Data

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.16
Cross References

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.17
Filtering Cross References

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.18
Reference Data: Find

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.19
Block Correction using Cross References

2x

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.20
Go to Location

1xright

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.21
Assignment of I,Q,M,T,C

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.22
Unused Symbols / Addresses without Symbols

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.23
Program Structure

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.24
Comparing Blocks (1)

...see
next page

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.25
Comparing Blocks (2)

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.26
Exercise: Eliminating Logical Program Errors

• Can you select the "Manual" mode?

• Can the conveyor belt be traversed in jog mode?

• Switch on the Automatic mode !

• Does the bottle stop at the bottle sensor for filling?

• Is there a message when the minimum level was


exceeded?

• Is the number of packaging units displayed on the digital


display?

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.27
Sporadic Errors

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.28
Displaying CPU Messages

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.29
Writing User Messages in the Diagnostic Buffer

CPU Node

e.g. PG, OP
Send buffer

SEND =
TRUE
1 2

SFC 52 Sending
asynchronous
to user program
Diagnostic buffer

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.30
Configuring Your Own Message Texts

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.31
Calling the SFC 52 Block

Network 2: User message when limit value exceeded

CMP>R
#analog value_
normalized IN1 M 90.1 SFC 52
P
5.000000e+003 IN2 EN

>=1
M 0.1

M 0.1 SEND

W#16#A901 EVENTN RET_VAL #error_sfc52

#dummy INFO 1

#analog value_
normalized INFO 2 ENO

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.32
Structure of the EVENTN Parameter of the SFC 52 Block

EVENTN 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Event class Identification Event number

1..9 are standard texts for the different events


(see the Standard and System Functions manual)
Event class A..B free texts, that are specified using Message Configuration

C..F reserved for expansions in the future

Specifies if it is an incoming or an outgoing event, or, an internal


or an external event, for example:
Identification Bit 8= "1" --> incoming message
Bit 8= "0" --> outgoing message
Bit 10= "1" --> internal fault
Bit 11= "1" --> external fault
Continuous message number from 1 to 255 within an
Event number
event class

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.33
Diagnostics-Capable Modules
Assigning parameters for a diagnostics-capable module:

... trigger a diagnostics


interrupt OB 82
when an error occurs

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.34
Displaying Hardware Diagnostics in the SIMATIC Manager

2x

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.35
Exercise: Enabling Diagnostic Messages

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.36
Exercise: Outputting User Messages

SFC 52
*
??? EN
*
TRUE SEND RET_VAL MW 52
W#16#9101 EVENTN
MW 54 INFO1

MD 56 INFO2

* a contact must be connected to the EN for programming in LAD !

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.37
Exercise: Enabling Diagnostic Interrupts and Simulating Hardware
Faults

Step What to Do Result

Enable the diagnostic interrupt at The hardware diagnostic is activated


1 the analog module ! (HW Config.)

2 Download the configuration in the CPU

3 Remove the front connector on the The "SF" LED on the analog module
analog module ! indicates a hardware fault

Activate the "Diagnose Hardware" The configuration is opened online


4 tool !

Clarify the cause of the error with The message "Power supply failure"
5
the tool ! is given as the cause of the error

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.38
System Information

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.39
System Information - Overview

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.40
Module Information: "Memory" Tab

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.41
Module Information: "Scan Cycle Time" Tab

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.42
Module Information: "Time System" Tab

... in the SIMATIC Manager:


PLC -> Set Date and
Time

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.43
Module Information: "Performance Data" Tab

... in the SIMATIC Manager:


• Blocks folder
-> Properties

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.44
Performance Data: Blocks

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.45
Exercise: Reading Out System Information

SIMATIC S7 Date: 29.05.2018 Information and Training Center


Knowledge for Automation
Siemens AG 1999. All rights reserved. File: PRO1_12E.46

You might also like