Professional Documents
Culture Documents
“Error Messages”
Technology Template
Technology CPU
For questions about this document please use the following e-mail address:
online-support.automation@siemens.com
Copyright Siemens AG 2010 All rights reserved
Basics 2
Functional Mechanisms 3
Installation 4
SIMATIC
"Error Messages" Startup 5
Technology Template
Technology CPU
Operation 6
Further Information 7
Copyright Siemens AG 2010 All rights reserved
References 8
History 9
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.
described in this application example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
Copyright Siemens AG 2010 All rights reserved
Table of Contents
Warranty and liability................................................................................................... 4
1 Technology Template........................................................................................ 7
1.1 Introduction........................................................................................... 7
1.1.1 The technology template ...................................................................... 7
1.1.2 Main contents of this technology template ........................................... 7
1.1.3 Scope ................................................................................................... 7
1.2 Objective and purpose ......................................................................... 7
1.2.1 Task...................................................................................................... 7
1.2.2 Advantages .......................................................................................... 8
1.3 Possible applications............................................................................ 9
1.3.1 Tasks that can be solved with the technology template....................... 9
1.3.2 Properties ............................................................................................. 9
1.3.3 Restrictions........................................................................................... 9
1.4 Components of the technology template............................................ 10
1.5 Approved hardware and software ...................................................... 10
1.5.1 Hardware components ....................................................................... 10
1.5.2 Software components......................................................................... 11
2 Basics ............................................................................................................... 13
2.1 Functional principle of the technology template................................. 13
2.2 Monitoring a technology object .......................................................... 13
Copyright Siemens AG 2010 All rights reserved
6 Operation.......................................................................................................... 30
6.1 Monitoring with FB 510 “ShowErrFB”................................................. 30
6.2 Monitoring with FB 511 “ShowErrDB” ................................................ 31
6.3 Error text output using “CPU Messages” ........................................... 32
6.3.1 Settings of the “CPU Messages” function .......................................... 32
6.3.2 Change language ............................................................................... 33
6.4 Error text output in WinCC flexible ..................................................... 34
6.5 Test program for the technology template ......................................... 34
6.5.1 Requirements for running the test program ....................................... 34
6.5.2 HMI of the test program...................................................................... 35
6.5.3 Operating the test program ................................................................ 36
6.6 Generating error messages ............................................................... 38
6.6.1 Warning message 0021: Dynamic values are being limited .............. 38
6.6.2 Error message 8014: Approached a software limit switch ................. 39
6.6.3 Error message 8040: The axis / external encoder is not enabled, or
the wrong mode is set ........................................................................ 40
6.6.4 Error message 8074: The leading axis is not configured for
synchronous operation ....................................................................... 40
7 Further Information ......................................................................................... 42
7.1 Expanding the text libraries................................................................ 42
7.2 Adding additional language versions ................................................. 42
7.2.1 Setting the display language in Step7................................................ 42
7.2.2 Exporting the text library..................................................................... 43
Copyright Siemens AG 2010 All rights reserved
1 Technology Template
1.1 Introduction
1.1.1 The technology template
1.1.3 Scope
When operating the technology CPU, states may occur in which warning and error
messages are output by the technology objects of the integrated technology or the
technology functions in the user program. These messages can only be detected
by targeted monitoring of the technology objects or technology functions and
indicated to the operator.
If a warning or error message occurs, a hexadecimal error code on the technology
object or the technology function is used to inform the user of the cause of the
error. However, this makes it difficult to easily and quickly interpret the warning or
error message and to locate the cause of the error.
This “Error Messages” technology template helps the user monitor the desired
technology objects and technology functions with regard to warning and error
messages and display the occurring events in STEP 7 or on a connected HMI in
clear text.
?
“Error Messages”
Error message
+
technology template additional
information
The “Error Messages” technology template thus enables the user to easily and
Copyright Siemens AG 2010 All rights reserved
1.2.2 Advantages
The use of this technology template provides the user with the following
advantages:
Adaptability
The function blocks and text libraries of the “Error Messages” technology template
are not protected and can be adapted and expanded by the user if necessary.
It is also possible to supplement user-defined error numbers and error texts in the
text libraries included in the delivery and to output them using the message
procedure of the technology template.
Using the technology template, the supported technology objects and technology
functions can be monitored for error messages and occurring warning and error
messages can be quickly displayed.
1.3.2 Properties
The “Error Messages” technology template can be used for clear text display of
error codes of the following technology objects and technology functions:
Note The warning and error messages included in the technology template text library
are valid for the technology objects and technology functions of
“S7 Technology” up to and including version 4.1.
1.3.3 Restrictions
FB 510 “317T_ErrorText”
“ShowErrFB” text library
FB 511 “317T_ErrorDescription”
“ShowErrDB” text library
The function blocks of the technology template can be used independently of one
another. They are used to monitor warning and error messages on the technology
objects and technology function calls of the integrated technology of the technology
CPU.
Copyright Siemens AG 2010 All rights reserved
The text libraries contain the warning and error messages for the hexadecimal
ErrorIDs of the integrated technology and additional info texts in clear text. They
can be displayed using the “CPU Messages” STEP 7 function or integrated into
self-created HMIs.
The warning and error messages and the additional notes on locating and
eliminating the causes of errors are available in the text libraries in clear text in
German and English.
Or alternatively:
Note To be able to use the “Error Messages” technology template, the following
system function blocks must be available in the controller:
SFC 18 “ALARM_S”: To output ALARM_S messages
SFC 24 “TEST_DB”: To check data blocks
2 Basics
2.1 Functional principle of the technology template
The figure below shows the functional principle of the “Error Messages” technology
template:
Text library
S7 user program
ErrorID = error text
ID Text
Technology
FB
ErrorID + status STEP 7
“Error Messages” Text
Technology technology
DB WinCC
ErrorID template flexible
Copyright Siemens AG 2010 All rights reserved
The function blocks of the “Error Messages” technology template monitor the
technology function calls (technology FB) or the technology objects (technology
DB) of the integrated technology. If an error or a warning occurs, the hexadecimal
ErrorID is transferred to the ALARM_S message system via the function block.
The ALARM_S message system combines the ErrorID with the error text stored
in the text library. This error text can then be displayed together with the ErrorID.
The “CPU Messages” function from STEP 7 is available as an output medium for
the warning and error messages. In addition, an output object in WinCC flexible
for ALARM_S messages can also be integrated into a self-created HMI and the
messages can be displayed on this HMI.
S7 user program
Technology TDB_Nr
DB
FB 511
ErrorID Error code “ShowErrDB”
ErrorID
S7 user program
Technology
Copyright Siemens AG 2010 All rights reserved
FB
Error Status Error
“ShowErrFB”
3 Functional Mechanisms
3.1 The ALARM_S message function
The generation of messages in this technology template is realized using the
SFC 18 “ALARM_S” system function.
This system function has to be called in the user program from a function block that
features an input for transferring the EventID. Special attributes must be assigned
to this input.
In the STEP 7 program, the EventID designates the message location for the
ALARM_S message function. When integrating the function block into the user
program in which the SFC 18 “ALARM_S” system function is called, STEP 7 –
due to the system attributes – automatically enters the EventID at the block input.
FB 510
Copyright Siemens AG 2010 All rights reserved
“ShowErrFB”
FB 511
“ShowErrDB”
To assign the necessary system attributes to the EventID input variable of a newly
created function block so that it can be used in conjunction with the SFC 18
“ALARM_S” system function, proceed as follows. These attributes have already
been set at the blocks of the technology template.
S7_a_type = alarm_s
S7_server = alarm_archiv
Note:
The attributes and values to be set
can be taken from the drop-down lists
Copyright Siemens AG 2010 All rights reserved
Note The use of multi-instance data blocks for the function blocks in which
SFC 18 “ALARM_S” is called is not possible since in this case the EventID
cannot be automatically assigned by STEP 7 and therefore no reference to this
block is possible in the ALARM_S message system.
The thus transferred process values can then be displayed separately within the
alarm message of the ALARM_S message system. The process values are
separated via the formatting of the ALARM_S message texts.
made.
Note:
For the input syntax for formatting the
message texts, please refer to the
next section.
The text messages to be output can be taken from a text library or entered directly
in the Message Configuration text line. In the technology template, for example, the
word “code” was put in front of the output of the error number.
In addition, process values can be output in the text message directly from the user
program, for instance, to output the axis number associated with the warning or
error message.
Element type
The element type defines the length of the respective process value within the
associated value. The element type must be suitable for the transferred process
value so that it can be processed consistently in the message system.
Figure 3-3 Element types of the process values within the associated value
In the above figure, the three transferred process values of the WORD type occupy
6 bytes of the possible 12 bytes of the associated value of SFC 18 “ALARM_S”.
Format
The output of the process value within the message text is defined via the format.
The process value can also be interpreted as an index of a text block in a text
library. In this case, the text block is output in the message text instead of the
process value.
Table 3-5 Possible formats for value output in the message text
Format Description Example
Copyright Siemens AG 2010 All rights reserved
Figure 3-4 Formats of the process values for the text output
Message text:
Axis @1I%3U@ - Code @2W%4X@ : @2W%t#317T_ErrorText@
The error and warning messages for clear text output are available in the delivered
text libraries in the following languages:
German
English (USA)
To output the clear texts, the language can be changed in STEP 7 or – if change
language was configured – in the HMI.
To change the display language in STEP 7 for the “CPU Messages” function,
proceed as follows:
The change language in WinCC flexible to change the language online must be
configured separately. At this point, only the most important steps will be briefly
described. For more detailed information, please refer to the WinCC flexible
documentation.
In the Language Settings section in Project Languages, select the desired
languages from the list.
In Device Settings and Languages and Fonts, define the order of the
selected languages.
In Communication and Tags, define an integer tag for the display language
change. This tag is an internal tag; that is why “<internal Tag>” is entered as a
Connection. In the tag properties in Events and Change Value, the
SetLanguage function is selected with the assignment of the display language
tag.
Set a button on the HMI that influences the integer tag for the display
language. The language is displayed whose ordinal number in the defined
order corresponds to the value of the tag for the display language.
Note An example of the change language in WinCC flexible can be taken from the test
Copyright Siemens AG 2010 All rights reserved
As shown in chapter 3.4.2, the text output must be formatted separately for each
configured language.
To do this, proceed as follows:
Table 3-7 Formatting the text output for the respective language
No. Action Remark
1. As described in chapter 3.5.2, select
the language version for which you
want to configure the text messages.
4 Installation
4.1 Preparations
4.1.1 Retrieving the technology template
Once you have transferred all blocks and text libraries supplied with the technology
template to your STEP 7 project, you can use the functions provided by the
technology template in your user program.
The calls of the function blocks of the “Error Messages” template in the STL and
FBD programming languages are shown below as examples:
FB 510
“ShowErrFB”
FB 511
“ShowErrDB”
When calling the function blocks and after assigning the instance data blocks,
STEP 7 automatically assigns a CPU-wide unique number to each block on the
EventID parameter.
A separate instance data block has to be assigned to each called function block of
the “Error Messages” template.
The use of multi-instance data blocks is not possible when using the function
blocks from the “Error Messages” template. In this case, the EventID is not
automatically assigned by STEP 7 and therefore a reference to the block in the
ALARM_S message system is not possible.
the HMIs.
This requires that the HMIs be configured in the STEP 7 project that includes the
text libraries to be integrated.
A message output via ALARM_S must be set up and configured in the HMI. To
integrate the text libraries, the HMI has to be recompiled.
Note When changes are made to the text libraries, the HMI also has to be recompiled
to apply the changes to the message display of the user interface.
5 Startup
5.1 Call environment
The blocks of the “Error Messages” technology template have to be called
cyclically in the user program. The call of the blocks can be made directly in an OB
or within a cyclically processed FB.
PLCopen
FB
Technology
objects
Cyclic OB
(e.g., OB1,
OB35 ...) FB 510
“ShowErrFB”
Copyright Siemens AG 2010 All rights reserved
Axes
5.2 Interfaces
5.2.1 Interfaces of FB 510 “ShowErrFB”
To monitor the technology function calls by the FB 510 “ShowErrFB” function block,
the following interfaces are available at the block:
EventID FB_ErrorID
Error
ErrorID FB 510
Axis „ShowErrFB“
AdditionalData
To monitor the technology objects by the FB 511 “ShowErrDB” function block, the
following interfaces are available at the block:
EventID FB_ErrorID
TDB_Nr
IgnoreWarnings FB 511
“ShowErrDB”
Output parameter
FB_ErrorID INT 0 If an error occurs in the block while
processing the error output, this
error is signaled here via the error
code.
If an error occurs when processing the error codes in the “Error Messages”
template, this error is displayed at the FB_ErrorID output of the relevant function
block via an error code.
The Ref. column indicates the block-internal error source of the function block of
the “Error Messages” technology template.
6 Operation
6.1 Monitoring with FB 510 “ShowErrFB”
To monitor technology function calls by the FB 510 “ShowErrFB” block, the FB 510
block has to be programmed after each technology function call to be monitored.
When using this block, it has to be carefully checked which technology function
calls are to be monitored since a separate instance data block must be assigned to
each block call of FB 510 “ShowErrFB”.
Note In the FBD/LAD programming language, the technology function call and the call
of the FB 510 block must be made in different networks.
For the call of the FB 510 block, the best network to be selected is the one after
the technology function call.
The STL programming language does not require this separation into different
networks.
Via the IgnoreWarnings input, the “True” or “False” status can be used to
additionally inform the function block of whether warning messages of the
technology object are to be output (“False”) or not (“True”).
Activation of
CPU monitoring.
In the window of the “CPU Messages” function, the following settings can be made
via the menu in the View section:
Place on Top: When new error messages arrive or when error messages are
deleted from the display, the “CPU Messages” window is automatically placed
in the foreground or a blinking signal in the taskbar indicates this status.
To change the display language in STEP 7 for the “CPU Messages” function,
proceed as follows:
NOTICE The test program is used to familiarize with the principle of operation and
the reactions of the technology template.
Copyright Siemens AG 2010 All rights reserved
This program is not intended for use in real machines and thus not
released.
The test program is available as an independent STEP 7 archive with all required
technology objects and STEP 7 blocks.
NOTICE Before changing the interface speed, you should check the maximum
speed of the CP or adapter you are using.
If this maximum speed is not 12 Mbps and if you download the application
to the CPU without changes, you can no longer access the CPU!
For this reason, you have to set all MPI busses in the project to the
maximum possible baud rate before downloading the application.
With the aid of the HMI of the test program, two virtual axes can be controlled using
jog buttons. It is also possible to transmit a positioning job via which the relevant
axis is automatically moved to the selected position.
The two axes of the test program are displayed on the HMI. The axes can be
enabled and reset below the respective drive motor with the buttons available in
this section. The axis enable is indicated by the green display next to the
respective motor. The position and the velocity of the axis are displayed above the
motor.
The enabled software limit switches in the plus and minus direction are displayed
at the lower end of the axis. They can be approached using the jog buttons of the
axis in the Jog section or by selecting the Move Absolute positioning command.
To synchronize the two axes via gearing, the Axis 1 -> GearIn -> Axis 2 button is
available. Synchronous operation coupling of the axes can be requested using this
button.
The error and warning messages are output in the top section of the HMI. This is
where the messages are output in the message display. Using the ShowErrFB
active and ShowErrDB active buttons, the message output for technology
function calls and technology objects can be activated. When the buttons are
green, the respective message function is activated. Using the Ignore Warnings
button, it is additionally possible to suppress the output of warning messages so
that only error messages are displayed in the message table.
The language of the error and warning messages can be selected online using the
two flags in the top right part of the HMI. The currently active language is displayed
with a green frame.
The HMI offers the following operating options for the test program:
Position
Velocity
Minus
jog button
MC_GearIn gearing
Axis
enabled
Axis
enable
The following functions are available to control the display of error messages:
Display section
Figure 6-4 Error display for error
messages
Note If, with the aid of the test program, error and warning situations are successively
generated in a period of time that is too short, the CPU may go to STOP!
To continue to execute the test program, the CPU must be restarted, i.e. it has to
Copyright Siemens AG 2010 All rights reserved
be reset to RUN.
The axes of the test program are set so that the dynamic values are being
permanently limited. Warning message 0021 “Dynamic values are being limited”
is thus output for each motion of the axis.
Note:
The message is only removed from the message
display when the monitoring is activated using the
ShowErrDB active button.
The software limit switch is approached when the yellow sensor at the lower end of
the slide reaches the yellow limit switch marking.
Note:
The message is only removed from the message
display when the monitoring is activated using the
ShowErrDB active button.
5. With the jog function move the axis away from the
software limit switch in the reverse direction using the
Minus or Plus jog buttons
or
using a positioning job by selecting a position in the
reverse direction and using the Go! button.
The controller detects that the target position of the positioning job is behind the
software limit switch and communicates this via warning message 0026 “Position
limited to software limit switch”.
6.6.3 Error message 8040: The axis / external encoder is not enabled, or the
wrong mode is set
6.6.4 Error message 8074: The leading axis is not configured for
Copyright Siemens AG 2010 All rights reserved
synchronous operation
In the S7T Config configuration tool, the axes of the test program are created in
such a way that a coupling option of the axes exists via MC_GearIn whereas the
leading axis coupling of the following axis to the leading axis was not activated.
Figure 6-6 Missing coupling between leading axis and following axis in S7T Config
7 Further Information
7.1 Expanding the text libraries
To expand the text library, call the desired library and add new rows to the text
library.
The reference to the respective text for display in the message text is made via the
index that is entered in the first column of the text library.
If the text is to be entered in several languages, the text library first has to be filled
in the currently activated language. All other languages then have to be entered by
changing the display language or, as described in the following chapters, by
exporting and importing the text library.
Before using or editing different language versions of the text libraries, all desired
languages first have to be defined in the SIMATIC Manager:
To be able to translate the already existing texts into the desired and just defined
languages, the entire text library must be exported.
Table 7-2 Exporting the text library
No. Action Remark
1. In the SIMATIC Manager in Options
and Manage Multilingual Texts,
select the Export function.
For editing, the exported text file in CSV format of the text library can now be
opened with Microsoft EXCEL. However, this requires that the Microsoft EXCEL
Open dialog box be used.
After opening, each language of the text library is available in a separate column.
Newly added languages are preset with the source language text. This text can
now be replaced by the translated wording.
Note When editing the CSV file, change only the texts in the target language column
and save the file in CSV format.
The original settings for all other entries and notes must not be changed.
Otherwise, problems may occur when importing the CSV file to STEP 7.
Note An exported text library should only be reimported to the project from which it
originates.
FB 510 “ShowErrFB” is best suited for the display of your own messages using the
Copyright Siemens AG 2010 All rights reserved
EventID FB_ErrorID
Error
ErrorID FB 510
Axis “ShowErrFB”
AdditionalData
This requires that the index of the desired message be entered at the ErrorID
input. When the Error input is set to True, the message – if the message text has
already been entered in the text library – is output via the “Error Messages”
technology template.
The message disappears from the display when the Error input of FB 510
“ShowErrFB” is reset to False.
Via FB 511 “ShowErrDB”, messages can be displayed that are output via a data
block.
EventID FB_ErrorID
TDB_Nr
IgnoreWarnings FB 511
“ShowErrDB”
The number of the data block to be monitored must be entered at the TDB_Nr
input. The function block then reads out the DBW 20 data word in the specified
data block and determines the data block type from this information. For
technology data blocks, the data block type also indicates the technology object
type.
The type of the data block also defines the address of the location in the data block
from which the error code can be read out.
By default, the “Error Messages” technology template supports the following
technology objects:
Table 7-4 Supported TO types (for Technology version 1.0, 2.0, 3.0 and 4.1)
Technology object TO type (UDT number) ErrorID address
V 1.0 V 2.0 V 3.0 V4.1
DriveAxis 1 13 17 34 DBW 26
PosAxis 2 12 22 31 DBW 26
FollowingAxis 3 11 23 32 DBW 26
ExternalEncoder 4 14 18 36 DBW 26
Cam 5 5 24 33 DBW 22
MeasuringInput 6 6 21 30 DBW 26
OutputCam 7 15 19 35 DBW 22
Copyright Siemens AG 2010 All rights reserved
If self-created data blocks are to be monitored, a type that refers to the correct
location of the message index (ErrorID) must be entered in the DBW 20 data word
of the data block. It may be necessary to supplement this type in FB 511
“ShowErrDB” accordingly.
8 References
8.1 References
This list is by no means complete and only presents a selection of related
references.
Table 8-1
Topic Title
/1/ STEP 7 Automating with STEP7 in STL and SCL
Hans Berger
Publicis MCD Verlag
ISBN 3-89578-113-4
/2/ STEP 7 SIMATIC – Programming with STEP 7 V5.3
Siemens manual
Edition 03/2006
MLFB: 6ES7810-4CA08-8AW1
/3/ STEP 7 SIMATIC – System Software for S7-300/400
System and Standard Functions
Siemens Reference Manual
Copyright Siemens AG 2010 All rights reserved
Edition 03/2006
MLFB: 6ES7810-4CA08-8AW1
/4/ STEP 7 SIMATIC – Statement List (STL) for S7-300/400
Siemens Reference Manual
Edition 03/2006
MLFB: 6ES7810-4CA08-8AW1
/5/ Technology CPU SIMATIC – S7-300 CPU Data: CPU 31xT-2DP
Siemens Manual
Edition 03/2008
MLFB: A5E01672598-01
/6/ Technology CPU SIMATIC – S7 Technology
Siemens Function Manual
Edition 03/2008
MLFB: A5E00251797-06
/7/ Technology CPU CPU 317T-2 DP: Controlling a virtual axis
Getting Started
Edition 03/2008
MLFB: A5E00266283-05
/8/ WinCC flexible SIMATIC HMI – WinCC flexible 2008
User Guide
Ausgabe 07/2008
MLFB: A5E01024720-02
/9/ WinCC flexible SIMATIC HMI – WinCC flexible
Getting Started for First Time Users
Edition 04/2006
MLFB: A5E00279530-03
/10/ WinCC flexible SIMATIC HMI – WinCC flexible
Getting Started for Power Users
Edition 04/2006
MLFB: A5E00279883-03
Topic Title
\7\ Technology CPU http://support.automation.siemens.com
manual
Select “Product Support”
In the Product Information tree, open the following directories:
Automation Technology
Automation and control systems
Industrial Automation Systems SIMATIC
PLC
Modular Controller SIMATIC S7
S7-300
CPUs
Select Manuals/Operating Instructions to open a list with
related documents or use the following links:
S7 Technology:
http://support.automation.siemens.com/WW/view/en/30119663
CPU manual 31xT-2 DP:
http://support.automation.siemens.com/WW/view/en/31265208
\8\ WinCC flexible http://support.automation.siemens.com
manual Select “Product Support”
In the Product Information tree, open the following directories:
Copyright Siemens AG 2010 All rights reserved
Automation Technology
Operator control and monitoring systems
HMI Software
HMI System SIMATIC WinCC flexible
SIMATIC WinCC flexible ES
Select Manuals/Operating Instructions to open a list with
related documents or use the following links:
9 History
Table 9-1
Version Date Modification
V1.0 First edition
V2.0 01/12/05 Revision of the “Error Messages” technology template:
Integration of the messages for the “S7 Technology”
option package up to version 2.0 into the text libraries.
Introduction of the compact documentation.
V3.0 09/18/06 Revision and extension of the “Error Messages” technology
template:
Integration of the messages for the “S7 Technology”
option package up to version 3.0 into the text libraries.
Implementation of the test program for the technology
template in WinCC flexible.
Modification of the documentation to comply with the
changes.
V4.1 02/18/09 Revision and extension of the “Error Messages” technology
template:
Integration of the messages for the “S7 Technology”
Copyright Siemens AG 2010 All rights reserved