TIA PRO1 14 Troubleshooting ENG
TIA PRO1 14 Troubleshooting ENG
Contents 14
14. Troubleshooting ................................................................................................... 14-2
14.1. Categories of Errors ............................................................................................................ 14-3
14.2. STEP 7 - Test Functions, Overview .................................................................................... 14-4
14.3. System Diagnostics - Overview .......................................................................................... 14-5
14.4. Hardware Diagnostics ......................................................................................................... 14-6
14.5. Online & Diagnostics ........................................................................................................... 14-7
14.5.1. Diagnostics: Diagnostics Buffer .......................................................................................... 14-8
14.5.2. Diagnostics Buffer: Interpreting Error Messages ................................................................ 14-9
14.5.3. Diagnostics Buffer: Opening a Faulty Block ..................................................................... 14-10
14.6. Call Hierarchy.................................................................................................................... 14-11
14.6.1. Exercise 1: Creating a Program Backup in the Project Library ........................................ 14-12
14.6.2. Exercise 2: Copying the Error Program ............................................................................ 14-13
14.6.3. Exercise 3: STOP Troubleshooting .................................................................................. 14-14
14.7. Monitor Block (Block Status) ............................................................................................. 14-15
14.7.1. Monitor Block: Modify Tags............................................................................................... 14-16
14.7.2. Monitor Block: Trigger Conditions / Call Environment ...................................................... 14-17
14.8. Monitor / Modify Variables (Tags): Watch Tables ............................................................. 14-18
14.8.1. Monitor / Modify Variables (Tags): Trigger Points ............................................................ 14-19
14.8.2. Enable Peripheral Outputs (in Planning Stage) ................................................................ 14-20
14.8.3. Force Variables (Tags) ..................................................................................................... 14-21
14.9. Reference Data: Cross-references of PLC Tags .............................................................. 14-22
14.9.1. Reference Data: Cross-references of a Variable (Tag) in the Block Editor ...................... 14-23
14.9.2. Reference Data: Assignment of I, Q, M, T, C ................................................................... 14-24
14.9.3. Reference Data: Call Structure ......................................................................................... 14-25
14.9.4. Reference Data: Dependency Structure ........................................................................... 14-26
14.10. Comparing Blocks ............................................................................................................. 14-27
14.10.1. Comparing Blocks: Show Details ...................................................................................... 14-28
14.11. Exercise 4: Testing the Motor Jog .................................................................................... 14-29
14.11.1. Exercise 5: Testing ‘Counting’ the Parts ........................................................................... 14-30
14.11.2. Exercise 6: Testing the Evaluation of Fault 3 ................................................................... 14-31
14.12. TRACE Analyzer Function ................................................................................................ 14-32
14.12.1. TRACES Editor ................................................................................................................. 14-33
14.12.2. Configuring a TRACE ....................................................................................................... 14-34
14.12.3. Downloading TRACE into the CPU and Activating It ........................................................ 14-35
14.12.4. Looking at / Saving TRACE in STEP7 .............................................................................. 14-36
14.13. Exercise 7: Creating, Looking At and Saving TRACE ...................................................... 14-37
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-1
SIMATIC TIA PORTAL Programming 1
14. Troubleshooting
... be able to check the wiring of digital input and output modules
TIA-PRO1 - Troubleshooting
14-2 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
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
commissioning)
Monitoring Functions
Diagnosis is important in the operating phase of a system or machine. Diagnosis usually occurs
when a problem (disturbance) leads to standstill or to the incorrect functioning of the system or
machine. Due to the costs associated with downtimes or faulty functions, the associated cause of
the disturbance has to be found quickly and then eliminated.
Categories of Errors
Errors that occur can be divided into two categories, depending on whether or not they are
detected by the PLC:
• Errors that are detected by the PLC’s operating system and that can lead to the Stop state of
the CPU.
• Functional errors, that is, the CPU executes the program as usual, but the desired function is
either not executed at all or it is executed incorrectly. The search for these types of errors is
much more difficult, since the cause of the error is initially hard to determine.
Possible causes could be:
• A logical programming error (software error) that was not detected during creation and
commissioning of the user program and probably occurs only on extremely rare occasions.
• A process fault that was triggered by the faulty functioning of components directly associated
with the process control, such as cables to sensors/actuators or by a defect in the
sensor/actuator itself.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-3
SIMATIC TIA PORTAL Programming 1
Test Functions
There are various STEP 7 test functions for troubleshooting, depending on the type of error
caused:
• ...when CPU in STOP
For errors that are detected by the system, the test functions Diagnostics buffer, Call hierarchy,
Local data stack and Hardware diagnostics give detailed information on the cause of the error
and the location of the interruption. By programming Error OBs (see the chapter on Organization
Blocks), information on the error that occurred can be evaluated by program and the transition of
the CPU into the STOP state can be prevented. If the CPU has stopped, the use of the test
functions Monitor / Modify Variable and Monitor Blocks makes little sense since the CPU neither
reads nor outputs process images while in the STOP state, and also no longer executes the
program.
• ...when CPU in RUN
Vice versa, it makes little sense, as a rule, to use test functions such as Local data stack for
troubleshooting when the CPU is in RUN, since program execution has not been interrupted and
the system does not provide any information on the error that occurred. The Module Information
test function merely provides general information on the CPU‘s operating status or on errors that
occurred in the past. Functional errors can be diagnosed as follows:
− Process Fault (such as a wiring error)
wiring test of the inputs: Monitor Variable
wiring test of the outputs: Enable Peripheral Outputs (only for CPU STOP)
− Logical Programming Errors (such as a double assignment)
All test functions listed, with the exception of Enable Peripheral Outputs, can be used for
searching for logical program errors.
− Force: Forced control of operands regardless of the program logic
− Breakpoints: Program execution in single steps
TIA-PRO1 - Troubleshooting
14-4 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
System Diagnostics
All those monitoring functions that deal with the correct functioning of the components of an
automation system are grouped together under System Diagnostics. All S7-CPUs have an
intelligent diagnostics system. The acquisition of diagnostic data by the system diagnostics does
not have to be programmed. It is integrated in the operating system of the CPU and in other
diagnostics-capable modules and runs automatically. The CPU (temporarily) stores errors that
occur in the diagnostics buffer and thus enables a fast and targeted error diagnosis by service
personnel, even for sporadically occurring errors.
System Reaction
The operating system takes the following actions when it detects an error or a STOP event, such
as an operating mode change (RUN STOP):
• A message on the cause and the effect of the occurring error is entered in the diagnostics
buffer, complete with the date and time. The diagnostics buffer is a FIFO (circular) buffer on
the CPU module for storing error events. The size of the diagnostics buffer depends on the
CPU (such as the CPU 315-2 DP = 100 entries). In the FIFO buffer structure, the most
recently entered message overwrites the oldest diagnostics buffer entry. A CPU Memory
Reset cannot delete the diagnostics buffer, only a “Reset to factory settings”.
• System status lists that give information about the system status of the modules are updated.
• The Error OB associated with this error is called. This gives the user the opportunity of
carrying out his own error handling.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-5
SIMATIC TIA PORTAL Programming 1
1xR
Diagnosing Hardware
To use this function you must open the "Device configuration" and establish an online connection.
The function "Diagnostic Hardware" gives information about the status or operating status of the
modules. You can see that there is diagnostic information for a module when you see the
diagnostic symbols that indicate the status of the associated module or the operating status of the
CPU.
In the example shown, the analog input module (slot 7) has triggered a diagnostic interrupt. As a
result, the CPU has gone into the STOP mode.
Both modules have been given symbols accordingly. With a single right-click on the CPU and
then "Online & diagnostics", the CPU’s diagnostic buffer is output; for the analog module, the
associated diagnostic data (see picture)
Symbol Meanings
TIA-PRO1 - Troubleshooting
14-6 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-7
SIMATIC TIA PORTAL Programming 1
Diagnostics Buffer
The diagnostics buffer is a buffered memory area on the CPU organized as a circular buffer.
It contains all diagnostics events (error messages, diagnostic interrupts, startup information etc.)
of the CPU in the order in which they occurred. The highest entry is the last event to occur.
All events can be displayed on the programming device in plain language and in the order in
which they occurred.
The size of the diagnostics buffer depends on the CPU. As well, not all of the diagnostics
buffer is buffered with PowerOFF (only a part is retentive).
Details on Event
Some additional information is also provided for the selected event in the "Details on event" box:
• Event name and number
• Additional information depending on the event, such as, the address of the instruction that
caused the event etc.
Help on Event
When you click on the button, help on the event selected in the list is opened. (In the example
shown, a programming error has occurred for which the relevant error OB (OB121) is not
programmed in the CPU.)
TIA-PRO1 - Troubleshooting
14-8 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-9
SIMATIC TIA PORTAL Programming 1
Opening a Block
For synchronous errors, that is, for errors that were triggered by a faulty instruction in the user
program, you can open the block in which the interruption occurred by clicking on the "Open in
editor" 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 highlighted. In the
example shown, the DB99.DBX100.1 bit is read-accessed, which does not exist in the data block.
TIA-PRO1 - Troubleshooting
14-10 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Call Hierarchy
The "Call hierarchy" tells you in which call path the block is monitored.
If the block was opened via the "Open in editor" button from the Diagnostics buffer, you can also
see in which path the error occurred via the entry in the call hierarchy.
If parameter-assignable blocks that are called multiple times in the program are monitored with
the test function "Block status" (Monitor block), the "Block status" does not supply any
unambiguous results. (see 14.7.2 Monitor Block: Trigger Conditions / Call Environment)
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-11
SIMATIC TIA PORTAL Programming 1
Task
You are to make a backup copy of your own program and the associated tags in the Project
library of your project "My_Project" since you will be working with a prepared error program
afterwards.
What to Do
1. In the "Libraries", open the Project library.
2. Select all S7 blocks of the CPU program and copy them into your Project library using drag &
drop.
3. Select all tag tables and copy them into your Project library using drag & drop.
4. Save your project and thus also the Project library.
TIA-PRO1 - Troubleshooting
14-12 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Task
You are to copy a prepared "error program" with the associated PLC tags from the global library
"PRO1_Lib" into your own project.
What to Do
1. In your project, delete all S7 blocks and all PLC tag tables.
2 In the "Global libraries", open the library <Drive>:\Archives\TIA\PRO1_Lib.
3. Using drag & drop, copy the library elements "Fault_Prog_Blocks" and "Fault_Prog_Var" into
your project (see picture).
4 Download all blocks of the error program into the CPU by selecting the CPU in the Project
tree and then clicking on the download button.
5. Carry out a CPU restart.
6. Save your project.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-13
SIMATIC TIA PORTAL Programming 1
What to Do
Please note that after every STOP error correction, a CPU restart must be carried out. If the CPU
once again goes into the STOP mode after the restart, a further STOP error exists.
During error correction, answer the following questions on the errors that occur:
− Error: ...............………………………………………..................................................................
− ……….……………………………………………………......................…………….............…….
− Error: ...........................……..………………………..................................................................
− ……………………………………………………………………………………….........................
TIA-PRO1 - Troubleshooting
14-14 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Monitor block
Monitor On / Off On / Off
Area of Use
The Monitor Block test function is used to be able to follow the program execution within a block.
For this, the states or contents of the operands used in the block at the time of program execution
are displayed on the screen. You can activate the "Monitor" ("Block Status") test mode for the
block which is currently open in the LAD/STL/FBD Editor by clicking the Glasses icon or via
Online Monitor.
At the beginning of the test function, it is insignificant whether the block to be monitored is opened
online or offline in the Editor. Should, however, the block opened offline not match the block
saved online in the CPU, you first either have to open the block saved online or load the block
opened offline into the CPU and then monitor it.
In the test mode, the states of the operands and LAD / FBD elements are displayed in different
colors. You define these by selecting the menu option Options Settings:
Examples:
• Status fulfilled "Element is displayed in green"
• Status not fulfilled "Element is displayed in blue"
Notes
The Status display is only active when the CPU is in RUN mode and the instructions to be
monitored are being processed!
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-15
SIMATIC TIA PORTAL Programming 1
1xR
Modify Tags
When the "Monitor block" test function is activated, it is possible to modify tags to status '0' or '1'.
The assignment of the status occurs once.
If the tag, whose status was modified to '0' or '1', is not overwritten by the program, it remains at
the assigned status. If, for example, an output is modified to status '1' and this tag is not
overwritten by the program, the output remains switched on or to status '1'.
TIA-PRO1 - Troubleshooting
14-16 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-17
SIMATIC TIA PORTAL Programming 1
Area of Use
The "Monitor/Modify Variables (Tags)" test function is used to monitor and / or modify variables
(tags) in any format you choose. For this, the desired variables are entered in a watch table. With
the exception of block-local, temporary variables, you can monitor and/or modify all variables
(tags) or operands.
You can choose the columns displayed in the Watch table via the menu View. The columns have
the following meanings:
• Name: symbolic name of the variable (tag)
• Address: absolute address of the variable (tag).
• Symbol comment: comment on the variable (tag) displayed
• Display format: a data format you can choose per mouse click (such as binary or decimal),
in which the contents of the variable (tag) is displayed
• Monitor value: variable (tag) value in the selected status format
• Modify value: value to be assigned to the variable (tag)
Watch Table
You can choose any name for the Watch table. Saved Watch tables can be reused to monitor
and modify so that a renewed input of the variables to be monitored is no longer necessary.
TIA-PRO1 - Troubleshooting
14-18 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
PII
Trigger point
"Beginning of
Scan Cycle"
once / by trigger by Trigger / once
modify variables monitor variables
show / hide all show / hide all enable peripheral outputs
modify columns trigger columns (disable output disables OD)
(CPU must be in STOP mode)
cyclic
program
execution
Trigger point
"Transition
to STOP"
Trigger point
"End of
Scan Cycle"
PIQ
Trigger Points
Through the "Monitor with trigger or Modify with trigger" columns, you can define the trigger
points for monitoring and modifying. The "Trigger Point for Monitoring" specifies when the values
of the variables being monitored are to be updated on the screen. The "Trigger Point for
Modifying" specifies when the given modify values are to be assigned to the variables being
modified.
Trigger Condition
The "Trigger Condition for Monitoring" specifies whether the values are to be updated on the
screen once only when the trigger point is reached or permanently (when the trigger point is
reached).
The "Trigger Condition for Modifying" specifies whether the given modify values are to be
assigned to the variables being modified once only or permanently (every time the trigger point is
reached).
Area of Use
The following tests, among others, can be implemented with the appropriate selection of trigger
points and conditions:
• Wiring test of the inputs:
Monitor variables, Trigger point: Start of scan cycle, Trigger condition: Permanent
• Simulate input states (user specified, independent of process):
Modify variables, Trigger point: Start of scan cycle, Trigger condition: Permanent
• Differentiation between hardware / software errors (an actuator that should be activated in
the process is not controlled)
Monitor variables, in order to monitor the relevant output Trigger point: End of scan cycle,
Trigger condition: Permanent
(output state = ´1´ > program logic OK > process error (hardware)
(output state = ´0´ > program logic error (such as double assignment)
• Control Outputs (independent of the program logic)
Modify variables, Trigger point: End of scan cycle, Trigger condition: Permanent
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-19
SIMATIC TIA PORTAL Programming 1
Conditions
• The CPU must be in STOP mode
• A Force task must not be active in the CPU
• The Watch table must be displayed in "extended mode", in other words, displayed with trigger
columns
• The peripheral outputs to be enabled are to be specified byte by byte, word by word or
double-word by double-word with the suffix :P (for peripheral)
• After the peripheral outputs have been enabled, the modify values can be activated via the
"Modify once only" button (not via "Modify with trigger").
Note
When changing the CPU’s operating status from STOP to RUN or STARTUP, Enable Peripheral
Outputs is deactivated and a message pops up.
TIA-PRO1 - Troubleshooting
14-20 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Notes on Forcing
Before your start the "Force" function, you should make sure that no one else is carrying out this
function at the same time on the same CPU.
A force task can only be canceled through an explicit "stop forcing" [deactivating the icon] (not via
Edit Undo!). Closing the Force table or exiting the application does not cancel the force task on
the CPU.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-21
SIMATIC TIA PORTAL Programming 1
Introduction
The cross-references list offers an overview of the use of operands and variables (tags) within the
user program. From the cross-references list, you can jump directly to the point of use.
The cross-references list contains the following information (depending on from which folder this
was opened):
• Which operand and which HMI tag is used in which block with which instruction and in which
HMI screen, (device and PLC tags, HMI tags)
• Which block is called by which other block (controller and program folder)
As part of the project documentation, the cross-references supply a comprehensive overview of
all operands, memory areas, blocks, variables (tags) and screens used.
Views
There are two views of the cross-references list which differentiate themselves by which objects
are displayed in the first column:
• Used by: Displays the referenced objects
Here, the locations (Point of use) where the object is used are displayed.
• Used: Displays the referencing objects.
Here, the users of the object are displayed.
The associated tooltips give further information on the respective objects.
Show Unused
This is a list of tags which are declared in the PLC tag table but are not used in the S7 user
program.
TIA-PRO1 - Troubleshooting
14-22 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Introduction
In the Inspector window, the cross-reference information for a selected object is displayed in the
tabs "Info > Cross-references". In this tab, you will see at which locations (Point of use) and from
which other objects every selected object is used.
In the Inspector window, cross-references are made even to those blocks which only exist online.
Structure
The cross-reference information is displayed in tabular form in the Inspector window. Each
column contains specific detailed information on the selected object and its use.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-23
SIMATIC TIA PORTAL Programming 1
Tooltip
"B_Bay2"
Assignment of I/Q/M/T/C
You get to the assignment list for I/Q/M/T/C via "Right-click on PLC tags -> Assignment list".
This assignment list gives you an overview of which bit is used from which byte of the memory
areas input (I), output (Q) and bit memory (M) and which SIMATIC timers and counters are used.
The type of use (reading or writing) is not displayed.
The memory areas inputs (I), outputs (Q) and bit memories (M) are displayed byte-by-byte in
lines.
The bits identified with a small diamond or binary operands (in the picture, for example, I 1.0 or
M 17.0) are used explicitly in the program.
The bits with a gray background (squares) together identify byte, word or double-word operands
(in the picture, for example, MW20) that are used in the user program. The operand dimension
(byte, word or double-word) comes from the vertical line in one of the columns "B" (Byte), "W"
(Word) and "D" (Double word).
Bits that have both a small diamond and a gray background are used explicitly as a binary
operand in the user program and are used through a byte, word, or double-word operand.
TIA-PRO1 - Troubleshooting
14-24 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Call structure
The call structure shows (describes) the call hierarchy of the blocks within an S7 program. It gives
you an overview of:
• The blocks used
• Jumps to the points of use of the blocks
• Dependencies between the blocks
• Local data requirements of the blocks
• Status of the blocks
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-25
SIMATIC TIA PORTAL Programming 1
Dependency Structure
The dependency structure shows the list of blocks used in the user program. In the first level (to
the very left) is the respective block and indented underneath it are the blocks which call this
block or use it.
The dependency structure also shows the status of the individual blocks through the use of
symbols. Objects which cause a time stamp conflict and which can lead to an inconsistency in the
program are identified with different symbols.
The dependency structure represents an extension of the cross-references list for objects.
TIA-PRO1 - Troubleshooting
14-26 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Types of Comparison
In principle, there are two different types of comparison:
Online/Offline comparison:
• The objects in the project are compared with the objects of the relevant device. For this, an
online connection to the device is necessary.
Offline/Offline comparison:
• Either the objects of two devices within a project, from different projects or a device and a
library are compared.
Symbol Meaning
Folder contains objects whose online and offline versions are different
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-27
SIMATIC TIA PORTAL Programming 1
Navigation to the
differences
Detailed Comparison
Through the detailed comparison you can identify exactly those locations that are different in the
online and offline version of a block. The following identifiers are used:
• Lines in which there are differences are highlighted in grey.
• Different operands and operations are highlighted in green.
• When the number of networks is different, pseudo networks are inserted so that a
synchronized representation of identical networks is possible. These pseudo networks are
highlighted in grey and contain the text "No corresponding network was found" in the title-bar
of the network. Pseudo networks cannot be processed.
• If the sequence of the networks is mixed up, pseudo networks are inserted at the appropriate
locations. These pseudo networks are highlighted in grey and contain the text "The networks
are not synchronized" in the title-bar of the network. The pseudo network also contains a link
"Go to network <No>", through which you can navigate to the associated network.
TIA-PRO1 - Troubleshooting
14-28 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
!!!
Task
The function "Jog conveyor motor" does not work. The combined use of the PG functions
"Monitor block" and "Watch table" (monitor tags [variables]) indicates that there must be a double
assignment at output "K_Right" (Q4.5). The task now is to find all instructions in the entire user
program that write-access this output.
What to Do:
1. Carry out a CPU restart.
2. On the touchpanel, switch off the "Plant".
3. Open the "FC_ConvMotor" (FC 16) block and activate the "Monitor" test function.
4. In the Project tree, under "Watch and force tables" create a new Watch table and in it monitor
the output "K_Right" (Q4.5).
5. Display the Blocks Editor with the opened "FC_ConvMotor" (FC16) and the Watch table one
below the other by splitting the working area (see picture).
6. Interpret the different status displays of the two test functions.
7. Localize the double assignment at output "K_Right" (Q4.5) with the help of the reference data
and correct the error.
8 Download all modified blocks into the CPU and check the how the program functions.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-29
SIMATIC TIA PORTAL Programming 1
Task
In the search for this logical error, you are to use, among others, the test function "Monitor data
block" and the test function "Monitor block".
Function Test
Counting and displaying the quantity of transported parts is programmed in "FC_Counting_Add"
(FC19) which determines the current quantity in the variable "DB_OP".Act_No (DB99.DBW2) by
adding up. Check whether the number of transported parts is correctly recorded and displayed on
the touchpanel.
What to Do:
1. First of all open "DB_OP" (DB99) and monitor the contents of the variable "DB_OP".Act_No
(DBW2).
2. It shows that "FC_Counting_Add" (FC19) does not store the correct quantity in the variable
"DB_Parts".Act_No. For that reason, also open "FC_Counting_Add" (FC19) and monitor it
with "Monitor block".
3. Correct "FC_Counting_Add" (FC19) and once again test the counting of the transported parts.
TIA-PRO1 - Troubleshooting
14-30 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Task
In the search for the last logical error, you are to use the test function ‘Monitor block with trigger’
on a certain block call.
Check whether the occurrence of Fault 3 (switch I 0.6 on the simulator) is displayed on the
simulator LED "P_Fault3" (Q0.4) with a flashing light, and whether, after acknowledging with the
simulator pushbutton "S_Acknowledge" (I 0.7), the flashing light switches to continuous light.
What to Do
1. To troubleshoot why no flashing light is displayed after Fault 3 occurs, first of all monitor
"FB_FaultEvaluation" (FB20) with the test function "Monitor block".
You will see that the output parameter #Display is flashing, however not the simulator LED
"P_Fault3" (Q0.4). The cause of this lies in the fact that you are monitoring the execution of
"FB_FaultEvaluation" (FB20) for the evaluation of Fault 2 or the first FB call in "FC_Fault" (FC17).
2. Even if you already know which correction is to be made:
Change the call environment as shown in the picture in such a way that you specifically
monitor the execution of "FB_FaultEvaluation" (FB20) for the evaluation of Fault 3.
3. Correct the error and once again monitor the evaluation of Fault 3.
4. Download all modified blocks into the CPU and check the function.
5. Save your project.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-31
SIMATIC TIA PORTAL Programming 1
Internal Flash
Caution!
A trace recording increases the runtime of the cyclic program execution which can
possibly also lead to an exceeding of the cycle time.
TIA-PRO1 - Troubleshooting
14-32 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Trace selection
Trace
Display
Trace
Download in Save in project Handling
Configure
CPU
Trace
Configur-
ation.
Traces Editor
The Traces editor is divided into three sections.
• Selection and Diagram area (upper part of the trace display)
• Signal table (lower part of the trace display)
• Trace handling
The trace configuration is made via the "Properties" tab in the Inspector window.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-33
SIMATIC TIA PORTAL Programming 1
In the
1 project -
offline
Trace Signals
All elementary data types in the I/O (process image), M, DB
Pre-trigger
In order to already record a period of time before the trigger event, a value greater than 0 must be
entered in the input field for the pre-trigger.
Sampling
Sampling is clocked via an associated cyclic or time-controlled OB.
→ here in the example, OB35 every 100ms
Retentiveness
Trace configurations in the device are retained with POWER-OFF; however, recorded values are
lost with POWER-OFF.
TIA-PRO1 - Troubleshooting
14-34 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
1
In CPU -
2
online
TRACE full
Requirements
• At least one trace is configured
• STEP7 is connected online with the CPU
Recording Start
• Trigger mode: Record immediately
⇒ recording starts immediately after activation
• Trigger mode: Trigger on tag
⇒ recording starts after activation only if trigger condition is fulfilled
Caution!
If a trace is activated once again, the previous recording is overwritten.
Recording Duration
Trace memory is full, that is, configured number of measuring points is recorded.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-35
SIMATIC TIA PORTAL Programming 1
Trace selection
Activate/Stop Trace
Legend On/Off
Trace diagram
On/Off
Save in project -
offline
1xR
Looking at Trace
If a trace is selected, the real-time value is displayed in the Diagram area even if the trace is not
yet started.
While the trace is recording, the diagram is updated.
If the trace if full, the recording stops automatically and the Diagram area displays the selected
trace data.
If several tags are logged in one trace, the diagrams can be shown or hidden by clicking .
Caution!
If a trace is started / activated once again, the previous recording is overwritten.
Through the icon in the Trace handling, traces saved in the CPU can be loaded into the
offline project. A trace can only be saved in the project when it is full, or, if the recording was
stopped.
Exporting a Measurement
To exchange measurements between projects, a trace (as *.ttrec) can be exported and imported.
For further processing, the CSV format can also be selected during export.
TIA-PRO1 - Troubleshooting
14-36 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
TRACE
Task
A weighing scale that is to weigh the workpieces is simulated with S_Slider 2. The values are
written into input word 30. The recording is to start when "P_Operation" (Q0.1) is switched on and
is then to be saved in the project.
What to Do
1. Configure a trace
Open the Traces editor and add a trace:
Editor area
underneath the
Trace display
For now, you can close the upper editor area (Trace display) as it is not required for the
configuration of the trace.
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-37
SIMATIC TIA PORTAL Programming 1
The recording is to take place every 100th OB1 cycle for the maximum possible recording
duration.
TIA-PRO1 - Troubleshooting
14-38 Training Document, V13.0
SIMATIC TIA PORTAL Programming 1
Trace selection
TIA-PRO1 - Troubleshooting
Training Document, V13.0 14-39