0% found this document useful (0 votes)
10 views27 pages

17 - Error and Troubleshooting

The document discusses various techniques for troubleshooting errors in SIEMENS PLC programs including classifying errors, using the diagnostic buffer, block and interrupt stacks, hardware diagnostics, monitoring variables, block status, cross referencing, and comparing blocks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
Download as ppt, pdf, or txt
0% found this document useful (0 votes)
10 views27 pages

17 - Error and Troubleshooting

The document discusses various techniques for troubleshooting errors in SIEMENS PLC programs including classifying errors, using the diagnostic buffer, block and interrupt stacks, hardware diagnostics, monitoring variables, block status, cross referencing, and comparing blocks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1/ 27

SIEMENS

ERROR & TROUBLESHOOTING

SIEMENS
SIMATIC S7 1/17 March 27, 2024
SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Objectives

- Learn How to Classify Errors.


- Module Information & Diagnostic Buffer.
- Detect Error Through Stacks.
- Hardware Diagnostic Through Hardware Configuration.
- Variable Table & Cross Reference.
- Track Errors Through Blocks (Go To & Compare)

SIMATIC S7 2/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS
Categories of Errors

Errors that are detected by the PLC‘s Functional errors, that is, the CPU
operating system and normally cause processes the program as usual, but
the CPU to go into the Stop state. thedesired function is either not
executed at all or it is executed
- Module failure incorrectly.
- Short-circuit in signal cables
- Scan time overrun - Process fault, Ex. wiring error
- Programming error (accessing - Logical programming error (not
a non-existent block) detected
during creation and startup)

SIMATIC S7 3/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Error

Error detected by the System:


General Rule: CPU in STOP
(such as accessing a non-existent DB)
(Diagnostic interrupt of a signal module)
Debugging Tools:
• Module Information
- Diagnostic buffer
- I STACK
- B STACK
- L STACK
• Hardware Diagnostics
Functional Error:
General Rule: CPU in RUN
(process fault, such as a wire break)
(logical programming error, like a double assignment)

Debugging Tools:
• Monitor / Modify Variable
• Monitor Blocks (Block Status)
• Reference Data

x x+1 x x+1

SIMATIC S7 4/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Module Information

SIMATIC S7 5/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS
Module Information, Diagnostic
Buffer

The diagnostic buffer is is a FIFO


buffer in the CPU.
The diagnostic buffer contains all
diagnostic events in
the order in which they occurred.
The diagnostic buffer cannot be
deleted by a memory reset.
All events can be displayed on the
programming device in plain text and
in the sequence in which they occur.

Details on Event
When you select an event, the
following additional information is
supplied in the "Details on Event" box

Help on Event
When you click on the button, help on
the event selected in the list is opened.

Open Block
When you click on the button, the
block in which the interruption
occurred can be opened online

SIMATIC S7 6/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Interpreting Messages, Diagnostic Buffer

After the restart, the error occurred and caused entries no. 2 and 3.
Event No. 2: the CPU goes into the STOP mode because the
associated error OB (OB 121) was not loaded into the controller.
Event No. 3: the actual cause of error, FC is not loaded to the CPU

SIMATIC S7 7/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS
Opening a Block Containing an Error
For errors that were triggered by a faulty instruction in the user program, you can
open the interrupted block by clicking on the "Open Block" button.
If the STL language is selected, the cursor is positioned directly in front of the
instruction that caused the interruption. In LAD/FBD, the network causing the
interruption is displayed.

SIMATIC S7 8/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

B Stack
The block stack (B stack) is a graphic
representation of the call hierarchy,
that is, the sequence and nesting of
the called blocks up to the point of
interruption.

The B stack also contains a listing of


all interrupt and error OBs as well as
the open DBs.
The program execution was
interrupted in the block shown at the
bottom of the list.

In the slide you can see that the


interruption occurred in the block
OB1. When a parameter-assignable
block is called several times, the
information, after which block call the
program execution was interrupted, is
relevant for troubleshooting, since the
cause of the interruption can lie in the
passing of faulty actual parameters
by the calling block.

SIMATIC S7 9/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

I Stack
The interrupt stack (I Stack) always
refers to an execution level. Before
you can open the I Stack, the
organization block concerned must
be selected in the B Stack.

The "Point of Interruption" field


gives you information about:
• The interrupted block, with the
option of opening it directly (the
cursor is then located directly in
front of the faulty instruction),
• The priority class of the OB,
whose execution level was
interrupted,
• Open data blocks with their
numbers and sizes.

SIMATIC S7 10/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

L Stack
The current values of the temporary
variables for blocks not ended at the
time of interruption are contained in
the L Stack.

SIMATIC S7 11/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Displaying the Hardware Diagnostics

SIMATIC S7 12/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Monitor/Modify Variables

SIMATIC S7 13/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Triggering Point for Monitor/Modify Variables

PII

Trigger point
"Beginning of Scan Cycle" Update
Monitor Modify Update Modified
Monitor values

Cyclic
program
execution
Trigger point
"Transition to STOP"

Trigger point
"End of Scan Cycle"

PIQ

SIMATIC S7 14/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Overwriting Variable Using Force Variables

SIMATIC S7 15/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Testing & Monitoring Block Status

SIMATIC S7 16/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Trigger Condition For Block Monitoring

SIMATIC S7 17/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Display Refrance Data

SIMATIC S7 18/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Display Cross Refrance Data

SIMATIC S7 19/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Assignment Of In/Out, Bit Memory, Timers & Counters

SIMATIC S7 20/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Program Structure

SIMATIC S7 21/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Unused Symbol In Symbol Table

SIMATIC S7 22/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Filtering Cross Reference

SIMATIC S7 23/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Find In Reference Data

SIMATIC S7 24/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Editing Blocks Using Cross Reference

SIMATIC S7 25/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Go To Location From Function To Function

SIMATIC S7 26/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Comparing Blocks

SIMATIC S7 27/17 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved

You might also like