You are on page 1of 44

Troubleshooting

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.1
Troubleshooting

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.2
Objectives

Upon completion of the chapter the participant will ...


... be able to classify occurring errors as "Errors detected by the system"
and "Functional errors"
... be familiar with the "Displaying CPU Messages" function
... be able to read out the diagnostic buffer, interpret it and use it
for troubleshooting
... be able to read out the I STACK, B STACK and L STACK and
interpret them
... be able to read out the hardware diagnosis
... be able to apply the "Monitor/Modify Variables" test function
... be able to interpret the displays of the "Monitor" test function in the
LAD/STL/FBD Editor and use them for troubleshooting
... be able to read out the reference data, interpret them and use them
for troubleshooting
... understand the "Force" function

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.3
Categories of Errors

Errors Detected by the System


• Recording, evaluating and indicating
errors within a PLC
(as a rule: CPU STOP)
• Module failure
• Short-circuit in signal cables
• Scan time overrun
• Programming error (accessing a
non-existent block)

Functional Errors
• Desired function is either not executed at all
or is not correctly executed
• Process fault (sensor/actuator, cable defective)
• Logical programming error (not detected
during creation and startup)

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.4
STEP7 - Debugging Tools, Overview
Error

Error detected by the System: Functional fault:


General Rule: CPU in STOP General Rule: CPU in RUN
(such as accessing a non-existent DB) (process fault, such as a wire break)
(Diagnostic interrupt of a signal module) (logical programming error, like a double assignment)

Debugging Tools: Debugging Tools:


• Module Information • Enable Peripheral Outputs (modify outputs)
- Diagnostic buffer • Monitor / Modify Variable
- I STACK • Monitor Blocks (Block Status)
- B STACK • Reference Data
- L STACK - Cross References
• Hardware Diagnostics - Assignment of I/Q/M/T/C
- Program Structure
- Addresses without Symbols
- Unused Symbols
Regardless of the cause of the error you could use:
• Force
• Enable Peripheral Outputs
• Set Breakpoints

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.5
System Diagnostics - Overview

CPU diagnostics detects CPU I/O module


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

CPU
messages

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.6
Displaying CPU Messages

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.7
Calling the "Module Information" Tool
SIMATIC® Manager LAD/STL/FBD Editor

Module Information

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.8
Module Information Tab: "Diagnostic Buffer"

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.9
Interpreting Error Messages in the Diagnostic Buffer

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.10
Opening a Block Containing an Error

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.11
Diagnostics with I Stack, B Stack, L Stack
Block containing error
Program structure

Point of interruption

The B stack shows a list of the Point of interruption


blocks that were executed up
to the point of interruption.

You can see the contents of the You can see the values of the
accumulators, registers, status word temporary variables at the
etc. at the time of interruption in the
time of interruption in the L stack.
I stack.

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.12
Contents of the B Stack

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.13
Contents of the I Stack

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.14
Contents of the L Stack

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.15
Displaying the Hardware Diagnostics

twice

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.16
Ex 1: Copying a Faulty Program and Preparing for Troubleshooting

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.17
Exercise 2: STOP Troubleshooting

Please Note: That after every STOP error correction, you


must carry out a CPU warm restart. If, after the
warm restart, the CPU once again goes into the
STOP state, there still exists a further STOP
error.

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.18
Calling the "Monitor/Modify Variables" Tool

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.19
Establishing Trigger Points for "Monitor/Modify Variable"

PII

Trigger point
"Beginning of Scan Cycle"
Monitor / Modify Update Status / Modify
Set depending on Values (one time
Trigger Trigger setting monitor / modify)

Cyclic
program
execution
Trigger point
"Transition to STOP"

Trigger point
"End of Scan Cycle"

PIQ

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.20
Opening a Variable Table and Establishing a Connection to the CPU

Accessible CPUs
Configured
Directly CPU
connected
Station 1 (VAT from Station 2 Station 3
CPU HW Station
"Station 2")

PG

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.21
Testing (Debugging) Blocks using "Monitor" (Block Status)

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.22
Information Displayed with "Block Debug > Monitor"
LAD/STL/FBD Editor -> Options ->Customize ... or
in running status:
right mouse click
on

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.23
Displaying Reference Data

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.24
Displaying the Program Structure

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.25
Displaying Cross References

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.26
Filtering Cross References

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.27
Block Correction using Cross References

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.28
Go To Location

1 x right

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.29
"Find" In Reference Data

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.30
Assignment of I, Q, M, T, C

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.31
Unused Symbols / Addresses without Symbols

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.32
Comparing Blocks (1)

...see
next page

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.33
Comparing Blocks (2)

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.34
"Force" Variables

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.35
Exercise 3: Testing the Motor Jog

!!!

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.36
Exercise 4: Testing the Quantity Display

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.37
If You Want to Know More

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.38
Selecting Process and Test Operation

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.39
Trigger Conditions for Block Monitoring (1)

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.40
Trigger Conditions for Block Monitoring (2)

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.41
Exercise 5: Testing the Evaluation of Fault 4

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.42
Testing the Program Execution using Breakpoints (Part 1)

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.43
Testing the Program Execution using Breakpoints (Part 2)

Break-
point

Next
state-
ment

SIMATIC S7 Date: 2/23/2012 SITRAIN Training for


Automation and Industrial Solutions
Siemens AG 2006. All rights reserved. File: PRO1_14E.44

You might also like