0% found this document useful (0 votes)
112 views

TIAv18IEC61850ClientBasicLibrary V102

Tia IEC61850 Client Library
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

TIAv18IEC61850ClientBasicLibrary V102

Tia IEC61850 Client Library
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

IEC 61850 Client

Library
Siemens
User Manual Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/Entry ID Support
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal
safety, as well as to prevent damage to property. The notices referring to your
personal safety are highlighted in the manual by a safety alert symbol, notices
referring only to property damage have no safety alert symbol. These notices
shown below are graded according to the degree of danger.

indicates that death or severe personal injury will result if proper


precautions are not taken.
DANGER

indicates that death or severe personal injury may result if proper


precautions are not taken.
WARNING

indicates that minor personal injury can result if proper precautions are not
taken.
CAUTION
 Siemens AG copyright year All rights reserved

NOTICE indicates that property damage can result if proper precautions are not
taken.

If more than one degree of danger is present, the warning notice representing the
highest degree of danger will be used. A notice warning of injury to persons with a
safety alert symbol may also include a warning relating to property damage.

Qualified Personnel
The product/system described in this documentation may be operated only by
personnel qualified for the specific task in accordance with the relevant
documentation, in particular its warning notices and safety instructions. Qualified
personnel are those who, based on their training and experience, are capable of
identifying risks and avoiding potential hazards when working with these
products/systems.

Proper use of Siemens products


Note the following:

Siemens AG A5E Number


Division Digital Factory Ⓟ05/2023 Subject to change
Postfach 48 48
90026 NÜRNBERG Copyright © Siemens AG copyright year.
Germany All rights reserved 2
Siemens products may only be used for the applications described in the
catalog and in the relevant technical documentation. If products and
components from other manufacturers are used, these must be
WARNING recommended or approved by Siemens. Proper transport, storage,
installation, assembly, commissioning, operation and maintenance are
required to ensure that the products operate safely and without any
problems. The permissible ambient conditions must be complied with. The
information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining
trademarks in this publication may be trademarks whose use by third parties for
their own purposes could violate the rights of the owner.

Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the
hardware and software described. Since variance cannot be precluded entirely, we
cannot guarantee full consistency. However, the information in this publication is
reviewed regularly and any necessary corrections are included in subsequent
 Siemens AG copyright year All rights reserved

editions.

Security information
Siemens provides products and solutions with industrial security functions that
support the secure operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it
is necessary to implement – and continuously maintain – a holistic, state-of-the-art
industrial security concept. Siemens’ products and solutions only form one element
of such a concept.
Customer is responsible to prevent unauthorized access to its plants, systems,
machines and networks. Systems, machines and components should only be
connected to the enterprise network or the internet if and to the extent necessary
and with appropriate security measures (e.g., use of firewalls and network
segmentation) in place.
Additionally, Siemens’ guidance on appropriate security measures should be taken
into account. For more information about industrial security, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them
more secure. Siemens strongly recommends to apply product updates as soon as
available and to always use the latest product versions. Use of product versions
that are no longer supported, and failure to apply latest updates may increase
customer’s exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial
Security RSS Feed under https://www.siemens.com/industrialsecurity.

Siemens AG A5E Number


Division Digital Factory Ⓟ05/2023 Subject to change
Postfach 48 48
90026 NÜRNBERG Copyright © Siemens AG copyright year.
Germany All rights reserved 3
Table of contents

Table of contents
Legal information ..................................................................................................... 2
1 Security ........................................................................................................... 7
1.1 Security Concept ............................................................................... 7
1.2 Qualified Personnel ........................................................................... 7
1.3 Note of Usage and Misuse................................................................. 7
1.4 Prevention of Misconfiguration ........................................................... 7
1.5 Disclaimer ......................................................................................... 7
1.6 System Hardening ............................................................................. 8
1.7 Integrity of Delivery ............................................................................ 8
1.8 Updates ............................................................................................. 9
1.9 Personal Data Disclaimer .................................................................. 9
2 System Requirements and Use Conditions ................................................ 10
2.1 Software .......................................................................................... 10
2.2 Library ............................................................................................. 10
2.3 Hardware......................................................................................... 10
2.4 Maximum number of instances per S7 400 CPU .............................. 10
2.5 General performance restrictions ..................................................... 10
2.6 Redundancy limitation ..................................................................... 11
2.7 Service Agreement .......................................................................... 11
3 Installation .................................................................................................... 12
 Siemens AG copyright year All rights reserved

3.1 Requirements .................................................................................. 12


3.2 TIA Portal – Open global library ....................................................... 12
3.3 Hardware Identifier .......................................................................... 14
3.3.1 S7-1500 Advanced Controller .......................................................... 14
3.3.2 S7-1500 Software Controller ............................................................ 14
3.3.3 S7-1500 R/H Controller.................................................................... 15
3.4 TIA Portal – Engineering .................................................................. 15
3.4.1 Setup IEC 61850 communication ..................................................... 16
3.4.2 Configure Tag blocks ....................................................................... 17
3.4.3 Engineer Tag blocks ........................................................................ 18
3.4.4 Setup redundant IEC 61850 communication .................................... 20
3.5 Configuring IEC 61850 addresses via StatCon................................. 21
3.5.1 Copy and paste IEC 61850 addresses ............................................. 21
4 Application Examples .................................................................................. 23
4.1 S7-1500 Advanced PLC .................................................................. 23
4.1.1 Hardware configuration .................................................................... 23
4.1.2 Engineering ..................................................................................... 24
4.1.3 Conclusion ...................................................................................... 26
4.2 S7-1500H Redundant PLC .............................................................. 27
4.2.1 Preconditions................................................................................... 27
4.2.2 Hardware configuration .................................................................... 28
4.2.3 Engineering ..................................................................................... 28
4.2.4 Conclusion ...................................................................................... 30
5 Block description ......................................................................................... 31
5.1 IEC61850_COM .............................................................................. 31
5.1.1 Block screenshot ............................................................................. 31
5.1.2 Block description ............................................................................. 31
5.1.3 Called blocks ................................................................................... 36
5.1.4 I/O description ................................................................................. 36
5.2 IEC61850_RCOM............................................................................ 38
5.2.1 Block screenshot ............................................................................. 38

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 4
Table of contents

5.2.2 Block description ............................................................................. 39


5.3 IEC_RD_BO (BOOL tag) ................................................................. 39
5.3.1 Block screenshot ............................................................................. 39
5.3.2 Block description ............................................................................. 39
5.3.3 Called blocks ................................................................................... 40
5.3.4 I/O description ................................................................................. 41
5.4 IEC_RD_BS (BITSTRING tag) ......................................................... 41
5.4.1 Block screenshot ............................................................................. 41
5.4.2 Block description ............................................................................. 41
5.4.3 Called blocks ................................................................................... 42
5.4.4 I/O description ................................................................................. 42
5.5 IEC_RD_IN (INTEGER tag) ............................................................. 42
5.5.1 Block screenshot ............................................................................. 42
5.5.2 Block description ............................................................................. 42
5.5.3 Called blocks ................................................................................... 43
5.5.4 I/O description ................................................................................. 43
5.6 IEC_RD_RL (REAL tag) .................................................................. 43
5.6.1 Block screenshot ............................................................................. 43
5.6.2 Block description ............................................................................. 43
5.6.3 Called blocks ................................................................................... 44
5.6.4 I/O description ................................................................................. 44
5.7 IEC_ALARM (BOOL tag with timestamp) ......................................... 44
5.7.1 Block screenshot ............................................................................. 44
5.7.2 Block description ............................................................................. 45
 Siemens AG copyright year All rights reserved

5.7.3 Called blocks ................................................................................... 45


5.7.4 I/O description ................................................................................. 46
5.8 IEC_REP (Report – BOOL tag with timestamp)................................ 46
5.8.1 Block screenshot ............................................................................. 46
5.8.2 Block description ............................................................................. 46
5.8.3 Alarming .......................................................................................... 47
5.8.4 Called blocks ................................................................................... 47
5.8.5 I/O description ................................................................................. 48
5.9 IEC_CTRL ....................................................................................... 48
5.9.1 Block screenshot ............................................................................. 48
5.9.2 Block description ............................................................................. 49
5.9.3 Called blocks ................................................................................... 50
5.9.4 I/O description ................................................................................. 50
5.10 IEC_WR_BO ................................................................................... 51
5.10.1 Block screenshot ............................................................................. 51
5.10.2 Block description ............................................................................. 51
5.10.3 Called blocks ................................................................................... 52
5.10.4 I/O description ................................................................................. 52
5.11 IEC_WR_BS.................................................................................... 53
5.11.1 Block screenshot ............................................................................. 53
5.11.2 Block description ............................................................................. 53
5.11.3 Called blocks ................................................................................... 53
5.11.4 I/O description ................................................................................. 54
5.12 IEC_WR_IN..................................................................................... 54
5.12.1 Block screenshot ............................................................................. 54
5.12.2 Block description ............................................................................. 54
5.12.3 Called blocks ................................................................................... 54
5.12.4 I/O description ................................................................................. 55
5.13 IEC_WR_RL .................................................................................... 55
5.13.1 Block screenshot ............................................................................. 55
5.13.2 Block description ............................................................................. 55
5.13.3 Called blocks ................................................................................... 56
5.13.4 I/O description ................................................................................. 56
6 Troubleshooting ........................................................................................... 57

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 5
Table of contents

7 Appendix....................................................................................................... 59
7.1 Service Agreement .......................................................................... 59
7.2 Service and support ......................................................................... 61
7.3 Industry Mall .................................................................................... 62
7.4 Related literature ............................................................................. 62
 Siemens AG copyright year All rights reserved

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 6
1 Security

1 Security
1.1 Security Concept
A direct connection of the devices to the internet has to be avoided. In order to
protect plants, systems, machines and networks against cyber threats, it is
necessary to implement – and continuously maintain – a holistic, state-of-the-art
industrial security concept. Siemens’ products and solutions constitute one element
of such a concept. For more information about industrial security, please visit
https://www.siemens.com/industrialsecurity
To increase the plant security, Siemens provides several Industrial Security
Services. Please check https://www.siemens.com/industrialsecurity for more
information on which service is applicable for your project.

1.2 Qualified Personnel


The product/system described in this documentation may be operated only by
personnel qualified for the specific task in accordance with the relevant
documentation, in particular its warning notices and safety instructions. Qualified
personnel are those who, based on their training and experience, are capable of
identifying risks and avoiding potential hazards when working with these
products/systems.
 Siemens AG copyright year All rights reserved

1.3 Note of Usage and Misuse


Siemens products may only be used for the applications described in the catalog
and in the relevant technical documentation. If products and components from
other manufacturers are used, these must be recommended or approved by
Siemens. Proper transport, storage, installation, assembly, commissioning,
operation and maintenance are required to ensure that the products operate safely
and without any problems. The permissible ambient conditions must be complied
with. The information in the relevant documentation must be observed.

1.4 Prevention of Misconfiguration


A misconfiguration of configured tags or the hardware properties can lead to
malfunctions, including:
 Hardware not reachable
 Redundancy doesn’t work
 Sporadic data loss
 Permanent data loss
To reduce this risk, a detailed signal loop test is highly recommended during
commissioning.

1.5 Disclaimer
We have reviewed the contents of this publication to ensure consistency with the
hardware and software described. Since variance cannot be precluded entirely, we
cannot guarantee full consistency. However, the information in this publication is
reviewed regularly and any necessary corrections are included in subsequent
editions.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 7
1 Security

This library fulfils the functionality, described in this document. Older releases of
this document are invalid. Functionality, which is not described or explicit marked
as ‘not supported’, is not supported by this product or software release.
It is possible that superior products (like PCS 7 or STEP7) provide a system
standard functionality (like SFC). If this functionality isn’t handled inside this
document, the system behavior of this library can differ from the superior system.
For more information about this topic, please contact
[email protected].

1.6 System Hardening


To increase the security of the plant, we recommend a system hardening of this
system and all other systems. Due to a large variety of needs/requirements, it is
not possible to suggest a concrete hardening strategy.
For this device, please refer to “PCS 7 compendium f” and consider this with
responsible and qualified personnel of your plant. System hardening requires a
deep knowledge about the guidelines, environment and needs on site. Therefore,
system hardening isn’t covered by the service agreement. Please note that a
wrong hardening configuration can impact the functionality.

1.7 Integrity of Delivery


 Siemens AG copyright year All rights reserved

Please ensure the integrity of the delivered components. To ensure the integrity,
we seal the packaging of hardware components and the storage volumes with the
following seal:
Figure 1-1 Valid seals

Invalid seals can be identified by:


 The corners are damaged from the removal and replacement of the seal.
 A removed seal leaves a pattern on the underground.
If the seal is placed again, that pattern is missing in the background.
 The seal was cut.

Figure 1-2 Invalid seals

NOTICE Please ensure that all components contain a valid seal.


If the seals are missing or broken, do not connect the device or data volume. In
this case, please contact us.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 8
1 Security

1.8 Updates
Depending on the update cause (feature extensions, bug fixing, closing security
issues, ...), the installation of the update should be considered. The availability of
security updates should be checked permanently to ensure a proper and secure
operation.
If a valid Service Agreement exists, the update can be requested on our hotline.

1.9 Personal Data Disclaimer


Siemens observes the principles of data protection, in particular the principle of
data minimization (privacy by design). For this reason, the product only processes /
stores technical functional data (e.g., time stamps) and no personal data. If the
user links this data with other data (e.g., shift plans) or stores personal data on the
same medium (e.g., hard disk) and thus establishes a personal reference, the user
must ensure compliance with data protection regulations.
 Siemens AG copyright year All rights reserved

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 9
2 System Requirements and Use Conditions

2 System Requirements and Use Conditions


2.1 Software
TIA Portal V18
IEC 61850 device engineering tool
IEC Browser
Most parts of this manual are also valid for TIA V13, V13.1, V14, V15, V15.1, V16,
V17. For more information, please contact [email protected].

2.2 Library
The mainline of this library is for the usage with CPU S7 1500. Depending on the
project environment, following versions can be requested:
 S7 300: Lib_TIA_v1x_IEC61850_Client_300_CP
Using the library with an additional CP module
 S7 300: Lib_TIA_v1x_IEC61850_Client_300_TCON
Using the library with the CPUs PN-IO port
 S7 400: Lib_TIA_v1x_IEC61850_Client_400
 Siemens AG copyright year All rights reserved

For more information, please contact [email protected].

2.3 Hardware
The following Hardware is supported with the IEC 61850 block library.
 S7-1500 - Advanced Controller (e.g.: 1511, 1513,1515, 1516, 1517, 1518)
 S7-1500 - Software Controller (e.g.: 1505SP, 1507S, 1508S)
 S7-1500 - Distributed Controller (e.g.: 1510SP, 1512SP)
 S7-1500 - Redundant Controller (e.g.: 1513R, 1515R, 1517H)
Application examples for S7-1511 and S7-1517H are in scope of delivery.
Configuration at other controllers might differ from the example projects.

2.4 Maximum number of instances per S7 400 CPU


Because the S7 CPU handles the IEC 61850 protocol, the IEC61850_COM/
IEC61850_RCOM block consumes a lot of scan time and memory. (The CP
module only handles the deeper Layers ISO on TCP and TCP.)
Therefore, the IEC 61850 library is limited to up to 8 connections per CPU.

2.5 General performance restrictions


The maximum number of IEC 61850 tags, which can be handled by the library,
depends on the used CPU and the number of connected IEC 61850 server
devices. To calculate the maximum number, we provide an excel sheet you can
download on our IEC 61850 product webpage:
https://support.industry.siemens.com/cs/document/109779276/power-control-
integration-services-calculation-sheet-for-pcs-7-and-tia-portal?dti=0&lc=en-DE

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 10
2 System Requirements and Use Conditions

2.6 Redundancy limitation


If the library is used in a redundant system, the cases in which a redundancy
switch over or a return to redundancy occur should be considered.
 In case of a redundancy switch over, the IEC61850_RCOM block reconnects
automatically. The reconnection duration depends on function block settings
and the cyclic interval but will be at least 10 seconds.
 Since the IEC 61850 connection technically behaves like a standard S7
connection, the connection is reinitialized after a redundancy return and should
only be performed with the necessary safety precautions.

NOTE In order to use the blocks, a license for each plant/project is required.

Additional functionality can be implemented on request.

2.7 Service Agreement


A 5-year service agreement (MLFB: 9LA11106PC102CA0) is mandatory for this
library. This service agreement covers questions about general topics, system
handling and troubleshooting via phone or email. This service agreement provides
library updates for new versions of TIA Portal. The license of the library and the
 Siemens AG copyright year All rights reserved

service agreement are bound to one plant.


Without a valid service agreement, no free of charge support or updates are
possible. If support via email or phone is required, an extended support package
has to be ordered if the service contract is run out.
A template of the service agreement document can be found in the appendix.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 11
3 Installation

3 Installation
3.1 Requirements
This version of IEC 61850 Client Library requires TIA V17. The usage of this library
with CFC Addon is not supported.

3.2 TIA Portal – Open global library


The IEC 61850 Client library is a global TIA Portal library with the file name
Lib_TIA_v17_IEC61850_Client_1500.al17.
The library has to be opened in the project view of TIA Portal. Open the library with
the option “Open as read-only” in the open file dialog.

Figure 3-1 Open library


 Siemens AG copyright year All rights reserved

After the library was opened, you can find all objects for using the library in the
directory “Master copies”. This directory contains:
 The IEC 61850 data types
 The IEC 61850 symbols
 The IEC 61850 program blocks

Figure 3-2 Library structure

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 12
3 Installation

Copy the PLC elements from the library to your PLC object in the project which
should use the IEC 61850 communication.
 IEC 61850 symbols  PLC tags
 IEC 61850 data types  PLC data types
 IEC 61850 program blocks  Program blocks

Figure 3-3 PLC


 Siemens AG copyright year All rights reserved

Compile all your program blocks (Software / Rebuild all blocks).


After the compile action is finished, the following system blocks should be added to
your PLC.

Table 3-1 System blocks


BLOCK NO NAME PLC-Type
FB 700 Program_Alarm S7-1500
FB 1030 TSEND_C S7-1500
FB 1031 TRCV_C S7-1500
FC 108 RH_GetPrimaryID S7-1500 R/H

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 13
3 Installation

3.3 Hardware Identifier


Like mentioned in the introduction, the IEC 61850 client library can be used with
various S7-1500 PLCs. As there are different PLC types available, depending on
the product used, some points must be considered. Even before programming
starts, the network interface to be used must be defined. As not every ethernet
interface is suitable for IEC 61850 communication, the next chapter contains
information about which ports can be used and how to identify the required
hardware identification IDs.

3.3.1 S7-1500 Advanced Controller

In case of an S7-1500 Advanced Controller (e.g., S7-1511-1 PN), the internal PN-
Interface as well as the ethernet interface of an external CP can be used for IEC
61850 communication. To get the correct hardware identifier, please select the
desired port and switch to “System constants”. The hardware identifier of the
superior ethernet interface must be used for IEC communication, so make a note of
this number for programming which is explained in chapter 3.4.

Figure 3-4
 Siemens AG copyright year All rights reserved

3.3.2 S7-1500 Software Controller

In case of an S7-1500 Software Controller (e.g., S7-1505SP), the internal PN-


Interface can be used for IEC 61850 communication. The ethernet interface, which
is used for the Windows environment, cannot be used for IEC 61850
communication with this library. To get the correct hardware identifier, please
select the desired port and switch to “System constants”. The hardware identifier of
the superior ethernet interface must be used for IEC communication, so make a
note of this number for programming which is explained in chapter 3.4

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 14
3 Installation

Figure 3-5

3.3.3 S7-1500 R/H Controller

In case of an S7-1500 R/H Controller (e.g., S7-1517H-3 PN) the internal PN-
Interfaces can be used for IEC 61850 communication. To get the correct hardware
identifier, please select the desired port and switch to “System constants”. The
hardware identifier of the superior ethernet interface must be used for IEC
communication, so make a note of these numbers at both PLCs for programming
which is explained in chapter 3.4.
 Siemens AG copyright year All rights reserved

Figure 3-6

3.4 TIA Portal – Engineering


An extensive function- and performance test was performed with up to eight IEDs.
The performance (reaction time and manageable number of signals) depends on
the CPU performance and engineering.
Theoretical memory consumption, CPU load and cycle time can be calculated by a
Excel sheet, that can be requested from [email protected].
The PCIS product portfolio also provides a more powerful and more flexible
product for larger data amount or more demanding requirements. The mentioned
product is the “PCIS Station Controller for TIA”. This product is an IEC
61850/60870 (Server/Client, Master/Slave) communication device, based on
CPU1515 (ET200SP with Soft-PLC). It can be used as communication gateway,
data concentrator or via internal Soft-PLC as a stand-alone device between IEC
61850/60870 and WinCC. For further information, please contact
[email protected].

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 15
3 Installation

3.4.1 Setup IEC 61850 communication

 Add a new cyclic organization block (e.g., OB35) to your PLC


 Add a new start up organization block (e.g., OB100) to your PLC
 Add a new Function Block (FB) to your PLC.
 Open the organization blocks in editor, drag the new FB into a network and
add the instance data block to your program.

Figure 3-7 Cyclic OB – Call FB

 Open the function block in the editor.


 Select the function block “IEC61850_COM” underneath the IEC 61850 group
directory in your PLC and drag it to a network in your function block. One block
is required for each IEDs.
 Add the instance data block to your program. The IEC61850_COM block’s
inputs and outputs are explained in detail in chapter 5.1.
 Siemens AG copyright year All rights reserved

 Configure the block inputs for communication with the IED:

IP_ADDR
Set the IED IP-Address of the IED at the input IP_ADDR.

CON_ID
Specify a unique connection ID at the input CON_ID for every IEC61850_COM
block, starting at “1”.

Interface_ID
Enter the Interface_ID identified in chapter 0.

MODE:
Here you can choose the mode for the cyclically reading of tags. It is important to
choose the correct mode for your application.
 Mode “1” – DATASET
 Mode “2” – LIST
For initial test purposes the LIST Mode should be used, as it is the easiest way to
set up an IEC 61850 connection. However, if your device supports DataSets, we
recommend using DATASET mode for productive operation, because it is the
fastest way for communication.

NOTE For more information see block description at chapter Fehler! Verweisquelle
konnte nicht gefunden werden. and application example 4.2.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 16
3 Installation

Reporting
If your IEC 61850 device supports Reporting, enter the DataSet address for
reporting, containing the list of Report values, in the input RP_DSADDR. (e.g.,
“CTRL/LLN0$$DataSet2”). Only the complete address is allowed.

NOTE For more information see block description at chapter Fehler! Verweisquelle
konnte nicht gefunden werden. and application example 4.2.

IED_NAME
Configure the Input IED_NAME with the IEC 61850 device name. (Please note, all
addresses and names are case sensitive).

SAMPLE_T
Set the cycle time of the OB which calls the communication block to SAMPLE_T.
This input should never be 0.0. It’s used for TIMOUT calculation. (e.g., 100 ms
Cycle time means SAMPLE_T = 0.1).

EN_MSG
To enable WinCC messaging, set EN_MSG to 1.
 Siemens AG copyright year All rights reserved

STRT_COM
Set the STRT_COM input to “OFF” until the engineering work is done; to start
communication, set it to “ON”.

Please follow up by adding at least one RD_XXX block. This procedure is


explained in chapter Fehler! Verweisquelle konnte nicht gefunden werden.
Fehler! Verweisquelle konnte nicht gefunden werden..

3.4.2 Configure Tag blocks

The IEC 61850 Client library is designed for a very flexible use. On one hand, there
is the IEC61850_COM block which handles the IEC 61850 protocol block and
management functionality. On the other hand, there are several blocks which can
be connected to the IEC61850_COM block, called tag blocks. Each of the tag
blocks represents one value in a special data format (e.g., INT, REAL, BOOL).

NOTE At least one IEC_RD_XXX block has to be connected to the IEC61850_COM


block.

Currently, the library supports the following tag blocks which read IEC 61850 tags
cyclically:
 IEC_RD_BO (BOOL)
 IEC_ALARM (BOOL with timestamp)
 IEC_RD_BS (BITSTRING)
 IEC_RD_IN (INT)
 IEC_RD_RL (REAL)

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 17
3 Installation

The following tag blocks read values on change with the IEC 61850 reporting
mechanism
 IEC_REPORT (BOOL on change with timestamp)
Switches can be controlled with:
 IEC_CTRL (uses IEC 61850 control mechanism)

Additionally, tags can be written (e.g., substitution values) with the following blocks
 IEC_WR_BO (BOOL)
 IEC_WR_BS (BITSTRING)
 IEC_WR_IN (INT)
 IEC_WR_RL (REAL)

3.4.3 Engineer Tag blocks

Add e.g., one IEC_RD_IN block. Set R0_CONNECT to the data block value
IEC61850_COM_DB.CONNECT.

NOTE For the following tag blocks always use the same order of R0_CONNECT.
 Siemens AG copyright year All rights reserved

Figure 3-8 Set R0_Connect to DB value “CONNECT”

Enter the IEC 61850 address string on input “ADDRESS”.

NOTE Please note you have to replace “$” with “$$”.

NOTE These IEC 61850 address strings can also be generated and copied via the
StatCon configuration tool. For further information see chapter 3.5.

Simple tag blocks


 IEC_RD_BS (BITSTRING),
 IEC_RD_IN (INT),
 IEC_RD_RL (REAL)
 IEC_RD_BO (BOOL)

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 18
3 Installation

The full path including the object attribute has to be entered, starting with the IEC
61850 domain name.
E.g., ‘CTRL/LLN0$$ST$$Loc$$stVal’ (for a BOOL tag block).

Complex tag blocks


 IEC_ALARM (BOOL with timestamp),
 IEC_REPORT (BOOL on change with timestamp)
 IEC_CTRL (uses IEC 61850 control mechanism)

NOTE Only the path to the object name itself has to be entered, e.g.,
‘CTRL/LLN0$$ST$$Loc’ (for a REPORT tag block).

NOTE In Case of IEC_CTRL, the path excluding Oper/SBO object has to be set up:
e.g., ‘CTRL/LLN0$$CO$$LEDRs’.
 Siemens AG copyright year All rights reserved

Figure 3-9 Example: Tag block configuration

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 19
3 Installation

WinCC messages
The tag blocks IEC_ALARM (BOOL with timestamp) and IEC_REPORT (BOOL on
change with timestamp) can be configured to generate messages in WinCC. The
message texts can be specified as described in the following:
 Open the PLC alarms in editor
 If you are using a single instance DB for your IEC_ALARM or IEC_REPORT
block, you can change the default text of the subalarm entries of MSG_EVID of
the block. These text entries are used for each single instance DB of this block.
 If you are using a multi instance DB for your IEC_ALARM or IEC_REPORT
block, no default alarm texts will be used. You have to declare the alarm texts
for each multi instance DB.
 After changing the message texts, the AS program and the HMI should be
compiled. The compiled AS program has to be downloaded to the CPU.

NOTE At least one cyclically read tag block (IEC_RD_XXX) has to be engineered to
establish the communication to an IEC 61850 device.

NOTE A maximum up to 80 cyclically read tag blocks can be configured. The maximum
size of connected blocks is 250. The more blocks are engineered, the more CPU
scan time is needed. Detailed performance information can be found in
Chapter 2.
 Siemens AG copyright year All rights reserved

3.4.4 Setup redundant IEC 61850 communication

The setup of redundant IEC 61850 connections is basically the same as a single
connection as described in chapter 3.4.1.
Please follow the instructions of the singular connection but use the
IEC61850_RCOM block instead of the IEC61850_COM and add the additional
configuration at the input parameters:

RECON_TIMEOUT
Configure a suitable value for the input RECON_TIMEOUT. For 100 ms cycle time,
at least 10 seconds should be used. If the cyclic communication is not reached, the
timeout value must be increased.

INTERFACE_ID2
Add a second INTERFACE_ID at the input INTERFACE_ID2 as mentioned in
chapter 0.

RP_CTRL_ADDR2
In case of DATASET mode and reporting mechanism, an additional report control
block is required. Set an IEC 61850 path to report control block at the input
RP_CTRL_ADDR2, which is different than the RP_CTRL_ADDR1.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 20
3 Installation

3.5 Configuring IEC 61850 addresses via StatCon


The delivery of the IEC 61850 Client Basic Library also contains the StatCon
configuration tool. This tool can be used to configure the correct IEC 61850
addresses on the tag blocks in your TIA Portal program.

3.5.1 Copy and paste IEC 61850 addresses

This chapter explains how addresses can be copied from StatCon to your blocks in
the TIA Portal program. For further information about working with the configuration
tool, please refer to the separated StatCon manual.
The first step is to add a new “IEC 61850 Client Basic Library” Station device and a
new “External device” in StatCon.
After this, you have to assign the ICD file of your IEC device to the external device.
If the settings of the external device were applied, the data structure of your IEC
device will be generated.
Drag the Data Objects of the IEC device you want to configure to the tag table of
the “IEC 61850 Client Basic Library” Station device. In the tag table, a new entry is
added, which contains the IEC 61850 address of your Data Object with the correct
object separators, as required on tag blocks of the IEC 61850 library in TIA Portal.

Figure 3-10 Drag Data Object to tag table


 Siemens AG copyright year All rights reserved

Using the checkbox in the table column “Alarm/Report”, you can select if the
address is used on a tag block or on an alarm or report block. If you want to use
the address on an alarm or report block, activate the checkbox. Afterwards, the
address does not contain the address part of the IEC 61850 Data Attribute name
anymore.

Figure 3-11 Address for a tag block

Figure 3-12 Address for alarm or report block

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 21
3 Installation

To copy the IEC 61850 address, open the context of the corresponding tag by a
right click on your mouse and select the context entry “Copy address to clipboard”.

Figure 3-13 Copy address from StatCon tag

After this, switch to your TIA Portal program block and paste the address value.

Figure 3-14 Paste address to TIA Portal program block


 Siemens AG copyright year All rights reserved

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 22
4 Application Examples

4 Application Examples
In the following two examples, different possible configuration options are shown
and explained step by step. The example projects are part of the scope of delivery
and should show possibilities how the library can be used correctly.

4.1 S7-1500 Advanced PLC


The first example shows the engineering basics of the IEC 61850 client library
used to connect three identical SIPROTEC4 protection relays to a S7-1500
Advanced controller with a CP-Modul.

Figure 4-1 Example 1 - Architecture


 Siemens AG copyright year All rights reserved

Because we want to keep the configuration as simple as possible, we will perform


a small configuration with a couple of common values including BOOL, FLOAT,
INTEGER which are exchanged cyclical, every 400 ms with the IED. Furthermore,
we will engineer a control function as it is usually used for switches.

4.1.1 Hardware configuration

The first step is to configure the hardware configuration for the used PLC as usual
in TIA Portal – in this example an S7-1511 advanced controller with an external
CP. As we want to use the CPs ethernet port for IEC 61850 communication, we
need to note the corresponding Hw_Interface ID. In this case it is “260” as marked
in the following picture.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 23
4 Application Examples

Figure 4-2 HW Interface ID / Singular PLC

4.1.2 Engineering

After the hardware configuration is done, drag & drop the master copies of the IEC
61850 client library to the corresponding folders at the PLC.
 Siemens AG copyright year All rights reserved

Figure 4-3 Master copies S7-1500

Create a startup OB (e.g., OB100) and a cyclic OB (e.g., OB35, 100 ms) which
calls a FB named “IED_0001”. For one complete data exchange cycle, four PLC
cycles are needed. In the FB “IED_0001” one IEC61850_COM block must be
inserted. Before we can start the configuration of the target values, the general
connection properties need to be set correctly as described in chapter 3.4.1.
The following Inputs must be set in this example:
Table 4-1
Input Value Comment
IP_ADDR 140.80.161.101 IP Address of IED
CON_ID 1 1st Connection
Interface_ID 260 As identified before
MODE 2 Only cyclic data exchange
IED_NAME IED_0001 IED name from SCD/ICD File

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 24
4 Application Examples

Input Value Comment


DS_CONF_OP 1 Dynamic Dataset supported
DS_NAME CTRL/LLN0$$DatasetIECLib Name for Dyn-Dataset
SAMPLE_TIME 0.1 Cycle time in seconds
EN_MSG 0 No alarming
START_COM Bool PLC Tag “gvStartCom” To start communication
RESET Bool PLC Tag “gvResetCom” To reset communication

Figure 4-4 IEC61850_COM configuration


 Siemens AG copyright year All rights reserved

After the configuration of the IEC61850_COM block is completed, the required tag
blocks for the IED can be engineered. At least one “Read”-Tag is mandatory. In
this sample application, five sample values are engineered to show the engineering
principles:
 Boolean
 Integer
 Float
 Bool with timestamp
 Control-Structure
Create static string variables for each corresponding IEC path of the target values
and instance dbs for the tag blocks as shown in picture Fehler! Verweisquelle
konnte nicht gefunden werden.”. At this point it is important to consider the right
IEC path for each block type. While all IEC_RD_XX-blocks need total IEC paths
e.g., ‘CTRL/LLN0$$ST$$Loc$$stVal’ the IEC_ALARM and the IEC_CONTROL
block needs the whole structure path, e.g., ‘CTRL/Q0CSWI1$$CO$$Pos’ without
absolute target value.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 25
4 Application Examples

Figure 4-5 IEC tag configuration

The next step is to connect the R0_CONNECT input to the CONNECT output of
the IEC61850_COM block and the ADDRESS input with the matching static string
containing the IEC 61850 path.
Finally, we need to create two more PLC tags to use the IEC_CTRL block. Connect
 Siemens AG copyright year All rights reserved

one Boolean PLC tag named “ctrlValue” with the input CTRLVAL and another
Boolean PLC tag named “ctrlTrigger” to the CTRL input.
At last, copy the IED_0001 block twice and rename it for the other two IEDs. If all
IEDs are the same, just the IP address, IED name and the CON_ID input must be
modified individually.
When the engineering is completed, the program can be loaded to the PLC for
testing purposes. The IEC 61850 communication can be started by modifying the
START_COM input of the IEC61850_COM block.
After a few seconds, the QSTATE output is expected to show “12”, which means
cyclic communication is in progress – the engineered tag blogs should now show
the correct values of the IEDs – it’s recommended to compare the online values
with a suitable tool, e.g., “IEC Browser”.

4.1.3 Conclusion

Congratulations, the first IEC 61850 communication to the S7-1500 PLC is


finished. Even if the communication is running fine, you should consider some
points before putting the PLC to productive use.
As the cyclic IEC 61850 communication leads to a high consumption of resources,
this kind of communication is only suitable for a small amount of IEDs depending of
the required update interval, the number of tags, the used PLC model and of
course the other task of the PLC.
As a more powerful PLC is not always a possible solution, you should take the
second application sample into account, where the “Report” mechanism for data
exchange of the IEC 61850 protocol is being used. This has big advantages
regarding the performance compared to the cyclic data exchange (also called
“Polling”).

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 26
4 Application Examples

4.2 S7-1500H Redundant PLC


The second example shows a more complex automation system including a
redundant S7-1500 PLC, several connected IEDs and an HMI panel. To reduce the
communication load for the PLC to a minimum, report mechanism is being used for
data exchange.

Figure 4-6 Example 2 - Architecture


 Siemens AG copyright year All rights reserved

4.2.1 Preconditions

To use the report mechanism for data exchange, it is required that the IEDs have a
preconfigured static dataset which contains all tags that shall be reported to the
client. Additionally, two buffered report control blocks are necessary as shown in
Figure 4-6. Usually, a separate engineering tool is required to configure the IED,
e.g., for SIPROTEC devices you need to use the DIGSI software.

Figure 4-7 Static DataSets & BRCBs

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 27
4 Application Examples

4.2.2 Hardware configuration

The first step is to configure the hardware configuration for the used PLC as usual
in the TIA Portal – in this example an S7-1517H redundant controller. As we want
to use both of the PLCs for IEC 61850 communication, we need to note the
corresponding Hw_Interface IDs. In this case, it is “65164” as marked in the
following picture for the first PLC and “65364” for the second PLC. Configure the
HMI panel for alarming of the S7-1517H PLCs.

Figure 4-8 HW Interface ID / Redundant PLC


 Siemens AG copyright year All rights reserved

4.2.3 Engineering

After the hardware configuration is done, drag & drop the master copies of the
IEC 61850 client library to the corresponding folders at the PLC.

Figure 4-9 Master copies S7-1500 R/H

Create a startup OB (e.g., OB100) and a cyclic OB (e.g., OB36, 50 ms), which calls
a FB named “IED_0100”. For one complete data exchange cycle, four PLC cycles
are needed. In the FB “IED_0100” one IEC61850_RCOM block must be inserted.
Before we can start the configuration of the target values, the general connection
properties need to be set correctly as described in chapter 3.4.4.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 28
4 Application Examples

The following inputs must be set in this example:


Table 4-2
Input Value Comment
IP_ADDR 140.80.161.211 IP Address of IED
CON_ID 1 1st Connection
INTERFACE_ID1 65164 As identified before
INTERFACE_ID2 65364 As identified before
RECON_TIMEOUT T#15s Reconnect delay 15s
MODE 1 Dataset mode
IED_NAME IED_0101 IED name from SCD/ICD File
DS_CONF_OP 1 Dynamic Dataset supported
DS_NAME CTRL/LLN0$$DatasetIECLib Name for Dyn-Dataset
RP_CONF_OP 1
RP_DSADDR CTRL/LLN0$$DatasetReport
RP_CTRL_ADDR1 CTRL/LLN0$$BR$$brcbA01
RP_CTRL_ADDR2 CTRL/LLN0$$BR$$brcbB01
SAMPLE_TIME 0.05 Cycle time in seconds
EN_MSG 1 Alarming enabled
START_COM Bool PLC Tag “gvStartCom” To start communication
 Siemens AG copyright year All rights reserved

RESET Bool PLC Tag “gvResetCom” To reset communication

After the configuration of the IEC61850_RCOM block is completed, the required


tag blocks for the IED can be engineered. At least one “Read”-Tag is mandatory. In
this sample application, several sample values are engineered to show the
engineering principles:
 Boolean
 Integer
 Float
 5x Boolean Report
Create static string variables for each corresponding IEC path of the target values,
and instance dbs for the tag blocks as shown in Figure 4-10. At this point, it is
important to consider the right IEC path for each block type. While all IEC_RD_XX-
blocks need total IEC paths e.g., ‘CTRL/LLN0$$ST$$Loc$$stVal’ the IEC_REP
block needs the whole structure path, e.g., ‘CTRL/Q0CSWI1$$ST$$Loc’ without an
absolute target value.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 29
4 Application Examples

Figure 4-10 IEC Report configuration

The next step is to connect the R0_CONNECT input to the CONNECT output of
the IEC61850_COM block, and the ADDRESS input with the matching static string
 Siemens AG copyright year All rights reserved

containing the IEC 61850 path.


At last, copy the IED_0101 block seven times and rename it for the other IEDs. If
all IEDs are the same, just the IP address, IED name and the CON_ID input must
be modified individually.
When the engineering is completed, the program can be loaded to the PLC for
testing purposes. The IEC 61850 communication can be started by modifying the
START_COM input of the IEC61850_COM block.
After a few seconds, the QSTATE output is expected to show “12”, which means
cyclic communication is in progress – the engineered tag blogs should now show
the correct values of the IEDs and the HMI will show the alarms in case of a signal
change at the report blocks – it’s recommended to compare the online values with
a suitable tool, e.g., “IEC Browser”.

4.2.4 Conclusion

In this application example, the principles of using the IEC 61850 Client Library
with reporting mechanism was explained, which is highly recommended to keep
the PLC load on a reasonable level.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 30
5 Block description

5 Block description
5.1 IEC61850_COM
5.1.1 Block screenshot

Figure 5-1 IEC61850_COM block S7-1500


 Siemens AG copyright year All rights reserved

5.1.2 Block description

IEC61850_COM block handles the IEC 61850 protocol. It manages all connected
tag blocks. It recognizes cyclic read tags, creates read requests and dispatches the
values to the connected blocks. Furthermore, reports are dispatched to the
dedicated blocks.
In the following, the most important inputs and outputs will be explained in detail.

RED_CONNECT
Do not change the default value of this input (default value 16#8001). This input is
just necessary for H-systems and these systems will not be supported by TIA
Portal.

CON_ID
CONN_ID specify the used connection between the PLC or CP and the IEC 61850
device. Every IEC61850_COM or IEC61850_RCOM block must have a unique
CON_ID.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 31
5 Block description

MODE
Mode input configures the way the IEC61850_COM block requests the cyclically
read values:
 DEBUG_MODE (0) means, the IEC_61850_COM block is running in debug
mode. It sends a read request for every tag, which should be read cyclically
and evaluates its response. In that mode, it can be verified if an IEC 61850 tag
address is not set up correctly. (QBAD = TRUE).

NOTE This mode is for debugging only.

NOTE This mode does not support IEC_CTRL, IEC_REPORT. Although the tag blocks
can be connected to the IEC61850_COM block, they will not work properly.

 DATASET (1) stands for DataSet mode. This means that at the beginning a list
(DataSet) is created in the IEC 61850 device. When running in ZYKLCOM, all
variables are read with requesting the list name. Not all devices support the
services to create a DataSet dynamically over the IEC 61850 protocol but allow
configuring a DataSet with an Engineering Tool.
 LIST (2) mode reads all the connected tags within one request. Therefore, a
 Siemens AG copyright year All rights reserved

list of tags containing all addresses is read cyclically. This mode is very scan
time consuming. It should only be used for devices which don’t support
DataSets.
Maybe the TIMEOUT variable has to be increased. This is indicated if the
IEC61850_COM block reaches the “ZYKLCOM” state but does not keep it
stable.
The following configurations are possible:

Table 5-1 DATASET configuration


Input name DataSet supported No DataSets
Dynamic DataSets Static DataSets Device does not
support
DataSets, use
Device allows dynamic DataSets can only be
creation of DataSets. created with engineering LIST mode.
tool.
MODE 1 = DataSet 1 = DataSet 2 = List
DS_CONF_OP 1 = Supported 0 = Not Supported 0 = Not
Supported
DS_NAME DataSet name of your Enter the DataSet name,
choice. Will be created which was previously
in device automatically configured with the
by the library. external engineering tool, -
e.g.,“CTRL/LLN0$$Dat e.g.,
aSet1”. „CTRL/LLN0$$DataSet1”

NOTE It is recommended to set MODE to DATASET, due to the fact it is the fastest way
to poll tags cyclically. If your IEC 61850 device does not support datasets, use
LIST mode.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 32
5 Block description

NOTE DEBUG mode should only be used to detect address configuration faults.

NOTE LIST mode as well as DATASET mode require a RESET for engineering
changes (add, delete blocks, address change).

Please see also table DATASET configuration at chapter 3.4.1.

IED_NAME
The IED name has to be set with this input (IED: Intelligent Electronic Device). The
IED name is a string and is set up with your engineering tool. (E.g., IED_001).
It can be read out with the IEC 61850 browser tool.

DS_CONF_OP
DS_CONF_OP stands for DataSet Configuration Operations. These can either be
supported or not supported. (Dynamic create, delete DataSets). Check your device
description to see if these operations are supported.

DS_NAME
 Siemens AG copyright year All rights reserved

The DataSet name is a string to identify your DataSet to cyclically read tags. The
DataSet is placed in the IEC 61850 device VMD area (entering only the DataSet
name like “DS1” or in the Device Domain/Item area, like “CTRL/LLN0$$DS1”).

NOTE The configured tag blocks have to be engineered in the same order as in the
DataSet. DataSet entries must not contain objects, but only attributes, except for
ALARM tags.

RP_CONF_OP
RP_CONF_OP stands for Reporting Configuration Operation. If the IEC 61850
device supports subscribing and unsubscribing reports, select “SUPPORTED”,
otherwise select “NOT_SPTED”.
If subscribing to reports is selected, the IEC61850_COM block enables the
buffered reporting for all tags included in the DataSet specified with RP_DSADDR
(whole address) with the trigger “on change”. Therefore, a free Report Control
block address which contains the RP_DSADDR in entry DataSet has to be
specified in RP_CTRL_ADDR.
If RP_CONF_OP is set to “SUPPORTED”, each installed report block (IEC_REP)
will be initialized during communication startup with the values of the connected
IEC 61850-Server device. After initialization, report values will only be changed if a
report is triggered through a connected IEC 61850-Server device.

RP_DSADDR
Specify the DataSet containing the tags for reporting. The whole DataSet address
has to be configured. E.g., ‘CTRL/LLN0$$DataSet1'.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 33
5 Block description

NOTE It is recommended to not configure the same DataSet you have configured on
input DS_NAME for cyclically reading the tag blocks (e.g., IEC_RD_BO,
IEC_RD_IN…). For reporting functionality, you have to create a separate
DataSet within your IEC 61850 server device with the related IEC 61850 device
engineering tool.

Further enter the Report Control block address (e.g.,


“CTRL/LLNO$$BR$$brcbA01”) at the input RP_CTRL_ADDR.

RP_CTRL_ADDR
Specify a free Report Control block address to enable reporting. Normally, the
corresponding Report Control blocks reside in the same tree part as the Report
DataSet. E.g., 'CTRL/LLN0$$BR$$brcbA01'.
IP_ADDR
Enter the IEC 61850 server IP address (protection relay) when using T-
communication.

TSAP_RID
Enter the IEC 61850 server TSAP number (default no: 0001 when using T-
communication.

Interface_ID
 Siemens AG copyright year All rights reserved

Hardware identifier of the local interface. Find this ID in the properties of your
communication module.

SAMPLE_T
Use SAMPLE_T to write the block OB cycle time in ms/100. This input should
never be 0.0. It is used for TIMOUT calculation.

EN_MSG
Enables WinCC messaging if set to “1”.

STRT_COM
OFF deactivates the communication via IEC 61850. ON starts the communication
again.

RESET
Reset deactivates the IEC 61850 communication, sets all internal variables to INIT
value and re-organizes the internal block list. It has to be executed, if for example a
tag block is removed or added, or an address has changed.

CONNECT
CONNECT output has to be connected with the tag block R0/1_CONNECT input.
(Singular mode: connect only R0_CONNECT, redundant mode: connect
R0_CONNECT, when IEC61850_COM is connected with CP Rack 0, otherwise
connect R1_CONNECT.)

QERR
QERR is set to “1” if any errors occur.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 34
5 Block description

QERR_NO
QERR_NO delivers detailed error information. (Not yet supported.)

QRACKF
QRACKF is set to “1” if a RACK failure occurs.

QPARF
QPARF is set to “1” if the plausibility check of connection parameters LADDR and
CONN_ID failed.

QCOMF
QCOMF is set to “1” if the IEC 61850 communication is not in state “ZYKLCOM”.
Communication error.

QB_CR_DS
If QB_CR_DS is set to “1”, the DataSet with the name specified in DS_NAME could
not be created.

QB_EN_RP
 Siemens AG copyright year All rights reserved

If QB_EN_RP is set to “1”, writing the Report configuration failed. Reporting could
not be enabled.

NOTE If QB_EN_RP is set to “1”, all connected IEC_REPORT blocks will not work
properly.

QSTATE
IEC 61850_COM is mainly organized with a state machine. QSTATE shows the
current state. If communication to the IEC 61850 device is established correctly,
the function block is running in state “ZYKLCOM” after initialization.
The following table lists the possible states:
Table 5-2 IEC61850_COM QSTATE output
QSTATE PROG_STATE Description
0 'INIT' Initialization state to get parameter
1 'CONREQ' Send initiate request
2 'CONRES' Receive initiate response
3 'CONERROR' Connection error (please see table on next page)
4 'CDSEXREQ' Send Request to check existence of DataSet
5 'CDSEXRES' Receive Response for DataSet existence request
6 'CDSCRREQ' Create DataSet request
7 'CDSCRRES' Create Dataset response
8 'CDSDLREQ' Delete DataSet request
9 'CDSDLRES' Delete DataSet response
10 'CINFOREQ' Write ReportCtrlblock request
11 'CINFORES' Write ReportCtrlblock response
12 'ZYKLCOM' Cyclic communication state.
13 'CONCLREQ' Conclude Request

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 35
5 Block description

QSTATE PROG_STATE Description


14 'CONCLRES' Conclude Response
15 'FINREQ' Release Request
16 'FINRES' Release Response
17 'ABORT' Abort received

5.1.3 Called blocks

Table 5-3 IEC61850_COM called blocks


Declaration/Block number Declaration/Block name
FB511 MMS_BuildReq
FB512 MMS_ParseResp
FB513 IEC61850CLPgrLgc
FB514 IEC61850_Link
FB529 MMS_ParseDSAddr
FB531 MMS_Strin_IP_Konv
 Siemens AG copyright year All rights reserved

FB63 TSEND
FB64 TRCV
FB65 TCON
FB66 TDISCON
UDT10 BST_BOOL_SHORT
UDT11 BST_INT_SHORT
UDT12 BST_REAL_SHORT
UDT13 BST_CTRL_SHORT
UDT14 IEC61850_Params
UDT16 BSt_BSTR_SHORT
UDT65 TCON_PAR
UDT7 BST_SHORT
UDT8 LINK_INFO
FC21 LEN
SFC20 BLKMOV
SFC49 LGC_GADR
SFC6 RD_SINFO

5.1.4 I/O description

Depending on the used library, not all inputs and outputs in the list will still be
required. These inputs and outputs wouldn’t exist on the block.

NOTE These inputs and outputs are marked in the list with the extension (opt.).

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 36
5 Block description

Table 5-4 IEC61850 I/O description


I/O I/O Name Type I/O Default Comment
I RED_CONNECT WORD 16#8001 Connection to
IEC61850_RED block
I CON_ID INT 0 connection ID
I TIMEOUT DINT 1000 Timeout in milliseconds
I MODE INT 0 Debug mode (0) / DATASET
(1) / LIST (2)
I IED_NAME STRING XXX IEC 61850 IED name
I DS_CONF_OP INT 0 DataSet Configuration
Operation SUPPORTED /
NOT SUPPORTED
I DS_NAME STRING XXX IEC 61850 Dataset name
I RP_CON_OP(opt.) INT 0 Report Configuration
Operation SUPPORTED /
NOT SUPPORTED
I RP_DSADDR(opt.) STRING XXX DataSet address used for
Reporting
I RP_CTRL_ADDR(opt.) STRING XXX DataSet Control block
address
I MSG_EVID(opt.) DWORD 2 Alarm_8P message ID //
depreciated
 Siemens AG copyright year All rights reserved

I SAMPLE_T REAL Sample time input (system


input)
I EN_MSG(opt.) BOOL 0 1 = enable alarm
I MSG_EVID(opt.) BOOL 0 System input for Alarming
I IP_ADDR(opt.) STRING 0 IEC 61850 device IP address
I TSAP_RID(opt.) WORD 0 TSAP remote ID for T-
communication
I CPU_ID(opt.) BYTE 0 Select correct CPU/CP for T-
communication
I TCON_ID(opt.) WORD 0 Use unique number for T-
communication instance
IO STRT_COM BOOL 0 1 = start communication
IO RESET BOOL 0 1 = reset function block
O CONNECT BOOL 1 Connection to input
R_CONNECT of READ_IEC
blocks
O QERR BOOL 0 General error
O QERR_NO WORD 0 Error number – not yet
supported
O QRACKF BOOL 0 1 = Rack failure (power fault,
CPU error, …)
O QPARF BOOL 0 1 = Parameter assignment
error module
O QCOMF BOOL 0 1 = Communication error,
Communication not running
in ZYKLCOM.
O QB_CR_DS BOOL 1 Create DataSet failed
O QB_EN_RP(opt.) BOOL 1 Subscribing Report failed
O QSTATE INT 0 Internal state

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 37
5 Block description

I/O I/O Name Type I/O Default Comment


O QSNDACT BOOL 0 1 = data sent
O QSNDDIAG WORD 0 Detailed send status
O QRCVDAT BOOL 0 1 = data received
O QRCVDIAG WORD 0 Detailed receive status
O QLEN INT 0 Length of received data
O QMSG_ERR(opt.) BOOL 0 1 = Message Error
O QMSG_SUP(opt.) BOOL 0 1 = Message suppression
active
O MSG_STAT(opt.) WORD 0 ALARM_8P: STATUS
Output
O MSG_ACK(opt.) WORD 0 ALARM_8P:
ACKNOWLEDGE Output
O QRACK_NO INT 0 CP Rack-Number
O QSLOT_NO INT 0 CP Slot-Number
O QBLOCKS INT 0 Number of connected blocks
O QTAGS INT 0 Number of connected tags
O QRCONNECT WORD 16#00 Red. Communication output
 Siemens AG copyright year All rights reserved

5.2 IEC61850_RCOM
5.2.1 Block screenshot

Figure 5-2 IEC61850_RCOM block S7-1500

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 38
5 Block description

5.2.2 Block description

IEC61850_RCOM block handles the IEC 61850 protocol. It manages all connected
tag blocks and redundancy. It recognizes cyclic read tags, creates read requests
and dispatches the values to the connected blocks. Furthermore, reports are
dispatched to the dedicated blocks.
In the following, the most important inputs and outputs will be explained in detail.

RECON_TIMEOUT
The input RECON_TIMEOUT defines the time period after a connection reset will
be performed in case of a connection interrupt. The shorter the duration is
parameterized, the shorter the reconnection time will be after a redundancy switch
over. If the parameterized duration is too short, no connection to the IED can be
established.

RP_CTRL_ADDR1/2
RP_CTRL_ADDR1/2 specify a free Report Control block address to enable
reporting. Normally, the corresponding Report Control blocks reside in the same
tree part as the Report DataSet. E.g., 'CTRL/LLN0$$BR$$brcbA01'.

NOTE In case of DATASET mode and reporting mechanism, an additional report control
block is required. Set an IEC 61850 path to report control block at input
 Siemens AG copyright year All rights reserved

RP_CTRL_ADDR2 which is different to RP_CTRL_ADDR1.

Interface_ID1/2
Hardware identifier of the local interface. Find those ID for both redundant PLCs in
the properties of your communication module.
Input/Output description is equal to IEC61850_COM Block description. Please see
chapter 5.1.

5.3 IEC_RD_BO (BOOL tag)


5.3.1 Block screenshot

Figure 5-3 IEC_RD_BO

5.3.2 Block description

IEC_RD_BO reads one Boolean tag cyclically.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 39
5 Block description

R0/1_CONNECT
R0_CONNECT input has to be connected to the IEC61850_COM block CONNECT
output.

ADDRESS
The address for the tag has to be configured with the input ADDRESS. The
address has to be entered as an IEC 61850 address string including the IEC 61850
objects attribute name.

NOTE The additional character “$” has to be replaced with “$$” in STEP 7

NOTE The IEC 61850 address strings can also be generated and copied via the
StatCon configuration tool.

The function block outputs can be connected with other SIMATIC S7 blocks.
Example for an address: “CTRL/LLN0$$ST$$LEDRs$$stVal”.

TIMOUTMS
 Siemens AG copyright year All rights reserved

TIMOUTMS specifies the time in ms after the quality output QBAD changes to true,
if there is no actualization of the value.

QERR0
QERR0 is set, if the connection to the IEC61850_COM block cannot be found or is
faulty.

QCOMERR0
QCOMERR0 is set if the IEC 61850 communication handled by the
IEC61850_COM is not working properly. IEC61850_COM: QSTATE != ZYKLCOM.

QBAD
QBAD is set if the value is not valid anymore.
Possible reasons are:
 No connection to any IEC61850_COM block
 No IEC 61850 communication running
 Address string not set properly; value was not updated for time TIMOUTMS

VALUE
VALUE represents the actual BOOL value addressed through IEC61850_COM
IED_NAME and IEC_RD_BO ADDRESS string.

5.3.3 Called blocks

Table 5-5 IEC_RD_BO called blocks


Declaration/Block number Declaration/Block name
UDT3 BST_BOOL
UDT8 LINK_INFO

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 40
5 Block description

Declaration/Block number Declaration/Block name


FC10 LEN
FC21 LEN
SFC64 TIME_TCK

5.3.4 I/O description

Table 5-6 IEC_RD_BO I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS STRING[52] IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in ms
I COUNTABLE BOOL 1 Internal value
O QERR0 BOOL 1 1 = Connection to
IEC61850_COM block 0 faulty
O QCOMERR0 BOOL 1 Communication
IEC61850_COM block 0 not ok
O QBAD BOOL 1 0 = Data valid
 Siemens AG copyright year All rights reserved

O VALUE BOOL 0 Addressed value as BOOL

5.4 IEC_RD_BS (BITSTRING tag)


5.4.1 Block screenshot

Figure 5-4 IEC_RD_BS

5.4.2 Block description

IEC_RD_BS reads one Bitstring tag cyclically. The Bitstring length is limited to 4
Bytes. Bitstrings with a length bigger than 4 bytes cannot be parsed.
Input/Output description is equal to IEC_RD_BO Block description. Please see
chapter 5.3.2.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 41
5 Block description

5.4.3 Called blocks

Table 5-7 IEC_RD_BS called blocks


Declaration/Block number Declaration/Block name
UDT15 BST_BSTR
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

5.4.4 I/O description

Table 5-8 IEC_RD_BS I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS STRING[52] IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in ms
I COUNTABLE BOOL 1 Internal value
 Siemens AG copyright year All rights reserved

O QERR0 BOOL 1 1 = Connection to


IEC61850_COM block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O VALUE DWORD 0 Addressed value as BITSTRING

5.5 IEC_RD_IN (INTEGER tag)


5.5.1 Block screenshot

Figure 5-5 IEC_RD_IN

5.5.2 Block description

IEC_RD_IN reads one DINT tag cyclically. The Integer size is 32 bit (4byte).
Input/Output description is equal to the IEC_RD_BO Block description. Please see
chapter 5.3.2.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 42
5 Block description

5.5.3 Called blocks

Table 5-9 IEC_RD_IN called blocks


Declaration/Block number Declaration/Block name
UDT4 BST_INT
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

5.5.4 I/O description

Table 5-10 IEC_RD_IN I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS STRING[52] IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in ms
 Siemens AG copyright year All rights reserved

I COUNTABLE BOOL 1 Internal value


O QERR0 BOOL 1 1 = Connection to
IEC61850_COM block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O VALUE DINT 0 Addressed value as Integer
(DINT)

5.6 IEC_RD_RL (REAL tag)


5.6.1 Block screenshot

Figure 5-6 IEC_RD_RL

5.6.2 Block description

IEC_RD_RL reads one REAL tag cyclically. The Floating point value size is 32 bit
(4byte).

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 43
5 Block description

Input/Output description is equal to IEC_RD_BO Block description. Please see


chapter 5.3.2.

5.6.3 Called blocks

Table 5-11 IEC_RD_RL called blocks


Declaration/Block number Declaration/Block name
UDT5 BST_REAL
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

5.6.4 I/O description

Table 5-12 IEC_RD_RL I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
 Siemens AG copyright year All rights reserved

I ADDRESS STRING[52] IEC 61850 tag address


I TIMEOUTS INT 5000 Timeout in ms
I COUNTABLE BOOL 1 Internal value
O QERR0 BOOL 1 1 = Connection to
IEC61850_COM block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O VALUE REAL 0 Addressed value as Floating point
value (REAL)

5.7 IEC_ALARM (BOOL tag with timestamp)


5.7.1 Block screenshot

Figure 5-7 IEC_ALARM

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 44
5 Block description

5.7.2 Block description

IEC_ALARM reads one BOOL value cyclically with its timestamp, which is updated
if the variable changes.

NOTE This block is not supported by S7-300 CPUs.


 Siemens AG copyright year All rights reserved

NOTE The IEC 61850 address strings can also be generated and copied via the
StatCon configuration tool. Example for an address: “CTRL/LLN0$$ST$$LEDRs”

NOTE The address has to be set without the IEC 61850 object’s attribute name, only
the IEC 61850 object name has to be set.

EN_MSG
EN_MSG enables Alarming in WinCC. Special messages can be specified.
Further Input/Output description is equal to the IEC_RD_BO Block description.
Please see chapter 5.3.2.

5.7.3 Called blocks

Table 5-13 IEC_ALARM called blocks


Declaration/Block number Declaration/Block name
FB530 UTCcalc
SFB35 ALARM_8P
UDT3 BST_BOOL
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 45
5 Block description

5.7.4 I/O description

Table 5-14 IEC_ALARM I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS BOOL 1 IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in milliseconds
I COUNTABLE BOOL 1 Internal value
I EN_MSG 1 = enable alarming in WinCC
I MSG_EVID DWORD Alarm_8 message ID
O QERR0 BOOL 1 1 = Connection to
IEC61850_COM block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O ALARM REAL 0 Alarm value (BOOL)
O TIMEST DT Time Stamp of Value
O MSG_DONE BOOL 0 1 = ALARM_8 DONE
O QMSG_ERR BOOL 0 1 = ALARM_8 Error
 Siemens AG copyright year All rights reserved

O QMSG_SUP BOOL 0 1 = Message suppression active


O MSG_STAT WORD 0 ALARM_8P: STATUS Output
O MSG_ACK WORD 0 ALARM_8P: STATUS Output

5.8 IEC_REP (Report – BOOL tag with timestamp)


5.8.1 Block screenshot

Figure 5-8 IEC_REP

5.8.2 Block description

IEC_REP reads one BOOL value asynchronous via IEC 61850 Report mechanism
with its timestamp.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 46
5 Block description

To use this Report block, the IEC 61850 device has to support the IEC 61850
service Report. Furthermore, a DataSet containing the tag (addressed with
IEC_REP) has to exist in the device. The DataSet name and its address for
Reporting have to be set in IEC61850_COM: RP_DSADDR. Furthermore, enabling
Reporting has to be executed successfully. IEC61850_COM: QB_EN_RP has to
be “0” after initialization.

ADDRESS
The address has to be set without the IEC 61850 object’s attribute name, only the
IEC 61850 object name has to be set.

NOTE The IEC 61850 address strings can also be generated and copied via the
StatCon configuration tool. Example for an address: “CTRL/LLN0$$ST$$LEDRs”

EN_MSG
EN_MSG enables Alarming in WinCC. Special messages can be specified.
Further Input/Output description is equal to IEC_RD_BO Block description. Please
see chapter 5.3.2.

NOTE When adding two IEC_REP tag blocks with the same address, only the first
 Siemens AG copyright year All rights reserved

IEC_REP tag will be updated. The library allows no duplicate IEC_REP blocks.

5.8.3 Alarming

There two different messages being triggered, depending on the value data type
(BOOL or BITSTRING). For both messages, the timestamps of the IEC 61850
report event (e.g., switch change time in IEC 61850 server device) are delivered to
WinCC.
Table 5-15
Message Block Default Message Message
no. parameters message text class no.
1 ALARM Report Alarm ALARM – high 1
Message 1

5.8.4 Called blocks

Table 5-16 IEC_REP called blocks


Declaration/Block number Declaration/Block name
UDT18 BST_REP
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 47
5 Block description

5.8.5 I/O description

Table 5-17 IEC_REP I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS BOOL 1 IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in milliseconds
I COUNTABLE BOOL 1 Internal value
I EN_MSG BOOL 1 1 = enable alarming in WinCC
I BS_VALUE BOOL 0 1 = value with BITRSTING type
I MSG_EVID DWORD Alarm_8 message ID
O QERR0 BOOL 1 1 = Connection to
IEC61850_COM block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O ALARM REAL 0 Alarm value (BOOL)
O TIMEST DT Time Stamp of Value
O MSG_DONE BOOL 0 1 = ALARM_8 DONE
 Siemens AG copyright year All rights reserved

O QMSG_ERR BOOL 0 1 = ALARM_8 Error


O QMSG_SUP BOOL 0 1 = Message suppression active
O MSG_STAT WORD 0 ALARM_8P: STATUS Output
O MSG_ACK WORD 0 ALARM_8P: STATUS Output

5.9 IEC_CTRL
5.9.1 Block screenshot

Figure 5-9 IEC_CTRL

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 48
5 Block description

5.9.2 Block description

IEC_CTRL controls an IEC 61850 device switch using the IEC 61850 Control
Service. If CTRL is set to “1”, a Control command is executed with the Control
value CTRLVAL.

ADDRESS
The address has to be set without the IEC 61850 object’s attribute name, only the
IEC 61850 object name has to be set. Addresses for Control objects contain the
function constraint “CO”.

NOTE The IEC 61850 address strings can also be generated and copied via the
StatCon configuration tool. Example for an address: “CTRL/LLN0$$CO$$LEDRs”

ORIGIN
Specify the command source (Actor). This string cannot be empty. Default value is
“SIEMENS”.

WITHILOC
If WITHILOC is set before executing control command, an Interlock check is done
in the device.
 Siemens AG copyright year All rights reserved

WITHSYNC
If WITHSYNC is set before executing control command, a Synchro check is done
in the device.

TEST
If TEST is set, the switch command is only for testing, real switching is not
executed.

CTRLVAL
Specifies the Command value: “0” stands for close, “1” represents open.

SBO
Specifies if “Select before Operate” should be used. If “Select before Operate” is
selected, a “Select” telegram is sent to the IEC 61850 device first and after
acknowledging, a second “Operate” telegram is sent to control the switch. If SBO is
disabled, only an “Operate” telegram is sent to the device.

QBAD
If the DONE bit is not raised up for time TIMOUT, QBAD gets “1”, else QBAD
equals “0”.

DONE
If the switch execution was successful, the DONE bit is raised up.
Further Input/Output description is equal to IEC_RD_BO Block description. Please
see chapter 5.3.2.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 49
5 Block description

5.9.3 Called blocks

Table 5-18 IEC_CTRL called blocks


Declaration/Block number Declaration/Block name
UDT6 BST_CTRL
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

5.9.4 I/O description

Table 5-19 IEC_CTRL I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS BOOL 1 IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in milliseconds
 Siemens AG copyright year All rights reserved

I COUNTABLE BOOL 1 Internal value


I ORIGIN STRING[52] Actor name, control source
I WITHILOCK 1 = enables Interlock check
I WITHSYNCHR 1 = enables Synchro check
I TEST Only test switch control command
I CTRLVAL Switch command
1: open
0: close
I SBO 1: Select before operate
0: only operate
IO CTRL BOOL Control command trigger, is reset
automatically
O QERR0 BOOL 1 1 = Connection to IEC61850_COM
block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0: QDONE raised up after CTRL = 1
1: QDONE did not raise up after
CTRL = 1
O QDONE REAL 0 Switch operation executed
successfully

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 50
5 Block description

5.10 IEC_WR_BO
5.10.1 Block screenshot

Figure 5-10 IEC_WR_BO

5.10.2 Block description

With the IEC_WR_BO block a Boolean variable can be written to an IEC 61850
Server Device. This block can be used for example to write substitution values.
 Siemens AG copyright year All rights reserved

R0/1_CONNECT
R0_CONNECT input has to be connected to the IEC61850_COM block CONNECT
output.

ADDRESS
The address for the tag has to be configured with the input ADDRESS. The
address has to be entered as an IEC 61850 address string including the IEC 61850
object’s attribute name.

NOTE The additional character “$” has to be replaced with “$$” in STEP 7

NOTE The IEC 61850 address strings can also be generated and copied via the
StatCon configuration tool. Example for an address:
“CTRL/LLN0$$ST$$LEDRs$$stVal”.

TIMOUTMS
TIMOUTMS specifies the time in ms after the output QBAD changes to true, if the
IEC 61850 device does not respond with a positive acknowledge in between.

VALUE
Represents the Boolean value which should be written to the IEC 61850 device.
Write is performed on value change.

RETRANS
If RETRANS is set to “TRUE”, the current value will be retransmitted. Input resets
automatically to “FALSE”.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 51
5 Block description

QERR0
QERR0 is set if the connection to the IEC61850_COM block cannot be found or is
faulty.

QCOMERR0
QCOMERR0 is set if the IEC 61850 communication the IEC61850_COM handles
is not working properly. IEC61850_COM: QSTATE != ZYKLCOM.

QBAD
QBAD is set if the value is not valid anymore.
Possible reasons are:
 No connection to any IEC61850_COM block
 No IEC 61850 communication running
 Address string not set properly, value was not written successfully in between
specified timeout
 Access rights: no permission for writing value / value cannot be overwritten

DONE
Done will be set to TRUE, after transmission of value
 Siemens AG copyright year All rights reserved

RETVAL
RETVAL shows the IEC 61850 Write return value.

5.10.3 Called blocks

Table 5-20 IEC_WR_BO called blocks


Declaration/Block number Declaration/Block name
UDT3 BST_BOOL
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

5.10.4 I/O description

Table 5-21 IEC_WR_BO I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS STRING[52] IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in ms
I COUNTABLE BOOL 1 Internal value
I VALUE BOOL 1 Tag value to be written in device
I RETRANS BOOL 1 Retransmission of value

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 52
5 Block description

I/O I/O Name Type I/O Default Comment


O QERR0 BOOL 1 1 = Connection to IEC61850_COM
block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O QDONE BOOL 0 Addressed value as BITSTRING
O RETVAL BYTE 0 Return code

5.11 IEC_WR_BS
5.11.1 Block screenshot

Figure 5-11 IEC_WR_BS


 Siemens AG copyright year All rights reserved

5.11.2 Block description

With the IEC_WR_BS block a Bitstring variable can be written in an IEC 61850
Server Device. This block can be used for example to write substitution values.
Input/Output description is equal to the IEC_WR_BO Block description. Please see
chapter 5.10.2.

5.11.3 Called blocks

Table 5-22 IEC_WR_BS called blocks


Declaration/Block number Declaration/Block name
UDT15 BST_BITSTRING
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 53
5 Block description

5.11.4 I/O description

Table 5-23 IEC_WR_BS I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS STRING[52] IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in ms
I COUNTABLE BOOL 1 Internal value
I VALUE DWORD 1 Tag value to be written in device
I RETRANS BOOL 1 Retransmission of value
O QERR0 BOOL 1 1 = Connection to IEC61850_COM
block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O QDONE BOOL 0 Addressed value as BITSTRING
O RETVAL BYTE 0 Return code
 Siemens AG copyright year All rights reserved

5.12 IEC_WR_IN
5.12.1 Block screenshot

Figure 5-12 IEC_WR_IN

5.12.2 Block description

With the IEC_WR_IN block, an Integer variable can be written in an IEC 61850
Server Device. This block can be used for example to write substitution values.
Input/Output description is equal to IEC_WR_BO Block description. Please see
chapter 5.10.2.

5.12.3 Called blocks

Table 5-24 IEC_WR_IN called blocks


Declaration/Block number Declaration/Block name
UDT4 BST_INT
UDT8 LINK_INFO
FC10 EQ_STRING

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 54
5 Block description

Declaration/Block number Declaration/Block name


FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

5.12.4 I/O description

Table 5-25 IEC_WR_IN I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
I ADDRESS STRING[52] IEC 61850 tag address
I TIMEOUTS INT 5000 Timeout in ms
I COUNTABLE BOOL 1 Internal value
I VALUE DINT 1 Tag value to be written in device
I RETRANS BOOL 1 Retransmission of value
O QERR0 BOOL 1 1 = Connection to IEC61850_COM
block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
 Siemens AG copyright year All rights reserved

block 0 not ok
O QBAD BOOL 1 0 = Data valid
O QDONE BOOL 0 Addressed value as BITSTRING
O RETVAL BYTE 0 Return code

5.13 IEC_WR_RL
5.13.1 Block screenshot

Figure 5-13 IEC_WR_RL

5.13.2 Block description

With the IEC_WR_RL block, a Real variable can be written in an IEC 61850 Server
Device. This block can be used for example to write substitution values.
Input/Output description is equal to IEC_WR_BO Block description. Please see
chapter 5.10.2.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 55
5 Block description

5.13.3 Called blocks

Table 5-26 IEC_WR_RL called blocks


Declaration/Block number Declaration/Block name
UDT5 BST_INT
UDT8 LINK_INFO
FC10 EQ_STRING
FC21 LEN
SFC20 BLKMOV
SFC64 TIME_TCK

5.13.4 I/O description

Table 5-27 IEC_WR_RL I/O description


I/O I/O Name Type I/O Default Comment
I R0_CONNECT ANY(Struct) Connection to IEC61850_COM
block DB
 Siemens AG copyright year All rights reserved

I ADDRESS STRING[52] IEC 61850 tag address


I TIMEOUTS INT 5000 Timeout in ms
I COUNTABLE BOOL 1 Internal value
I VALUE REAL 1 Tag value to be written in device
I RETRANS BOOL 1 Retransmission of value
O QERR0 BOOL 1 1 = Connection to IEC61850_COM
block 0 faulty
O QCOMERR0 BOOL 1 Communication IEC61850_COM
block 0 not ok
O QBAD BOOL 1 0 = Data valid
O QDONE BOOL 0 Addressed value as BITSTRING
O RETVAL BYTE 0 Return code

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 56
6 Troubleshooting

6 Troubleshooting
Table 6-1 Troubleshooting IEC 61850 communication
No Problem Possible Reason Solution
1. IEC61850_COM does MODE: DATASET, some of Change mode into LIST, to see which tags keep QBAD = “TRUE”. Check tag addresses
not get into QSTATE the tag addresses are not with the IEC 61850 browser tool.
“ZYKLCOM” valid
MODE: DATASET, DataSet Either check if static DataSet can be used. Set DS_CONF_OP to “FALSE” and ensure
modifications are not your tag block sequence is the same as your tag order in the existing DataSet.
supported with IEC 61850 Another possibility is to use “LIST” mode instead of DATASET mode.
device
TIMEOUT or SAMPLE_T are Check the TIMEOUT value. It’s the time the block waits for a successful response to its
requests. It should be at minimum 1000 ms. Running in LIST mode it should be at
 Siemens AG copyright year All rights reserved

not set properly


minimum 2000 ms.
Check SAMPLE_T. It should represent the current scan time / 100.
IEC61850 _COM block is Ensure the IEC61850_COM block is placed only in one OB (e.g., OB35).
placed in more than one
cyclic OBs
2. IEC_RD_XX tag QBAD Invalid IEC 61850 address Check the address of your tag with the IEC 61850 browser. Remember that in Step 7, the
=1 string additional sign “$” has to be replaced with “$$”.
Further keep in mind, for IEC_ALARM, IEC_REPORT and IEC_CTRL only the address
including the IEC 61850 object name has to be set. For all others the IEC 61850 attribute
has to be added to the address.
IEC 61850 Communication is Check the IEC61850_COM block, if running in QSTATE = “ZYKLCOM”. If not, check its
not established parameters.
IEC61850_COM IED_NAME Check IED name of IEC 61850 device.
does not equal IEC 61850
device name
3. IEC61850_COM No RESET executed Changes to the tag configuration, like address change, adding tag blocks, removing tag
QBLOCKS and blocks are taken over with executing a RESET.
QTAGS output does Execute a RESET.
not fit to tag
configuration

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 57
6 Troubleshooting

No Problem Possible Reason Solution


4. PLC Scan time Tag blocks are not executed To get a better performance of the PLC system, the tag blocks can be put in a lower
exceeded in the optimal OB numbered OB (e.g., OB34, OB33, OB32) with bigger scan times (e.g.,
200 ms, 500 ms, 1 s).
With this method you can optimize your PLC system.
5. Reporting does not WinCC settings are not Please check, if your OS is updated and works with your PLC program. Check if all
work, no WinCC correct connections to the PLC are established and working.
messages IEC_REP block should update the timestamp after the report was generated. (Compare
IEC_REP timestamp with tag timestamp get by IEC 61850 browser).
RP_EN_QB is set to “1” Something failed enabling Reporting with the Report Control block. Check if your
RP_DS_ADDR0/1 match with DataSet address get by IEC 61850 browser.
Reporting was not activated Please follow up the procedure described in Appendix A.1.1 Report configuration with
with DIGSI System DIGSI if using a SIPROTEC device. If using a different device, follow up the manual
 Siemens AG copyright year All rights reserved

Configurator (using a instructions to add a Report application.


SIPROTEC)
6. “ZYKLCOM” state is IEC61850_COM TIMEOUT Increase TIMEOUT value.
reached, but to small
IEC61850_COM block
does not keep this
state; communication
gets instable.

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 58
7 Appendix

7 Appendix
7.1 Service Agreement
Figure 7-1 – Service Agreement (1)
 Siemens AG copyright year All rights reserved

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 59
7 Appendix

Figure 7-2 – Service Agreement (2)


 Siemens AG copyright year All rights reserved

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 60
7 Appendix

7.2 Service and support


Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
support.industry.siemens.com

Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts.
Please send queries to Technical Support via Web form:
siemens.com/SupportRequest

SITRAIN – Digital Industry Academy


 Siemens AG copyright year All rights reserved

We support you with our globally available training courses for industry with
practical experience, innovative learning methods and a concept that’s tailored to
the customer’s specific needs.
For more information on our offered trainings and courses, as well as their
locations and dates, refer to our web page:
siemens.com/sitrain

Service offer
Our range of services includes the following:
 Plant data services
 Spare parts services
 Repair services
 On-site and maintenance services
 Retrofitting and modernization services
 Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
support.industry.siemens.com/cs/sc

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for iOS and Android:
support.industry.siemens.com/cs/ww/en/sc/2067

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 61
7 Appendix

7.3 Industry Mall

The Siemens Industry Mall is the platform on which the entire siemens Industry
product portfolio is accessible. From the selection of products to the order and the
delivery tracking, the Industry Mall enables the complete purchasing processing –
directly and independently of time and location:
mall.industry.siemens.com

7.4 Related literature


Table 7-1
Topic
\1\ Siemens Industry Online Support
 Siemens AG copyright year All rights reserved

https://support.industry.siemens.com
\2\ Download page of this entry
https://support.industry.siemens.com/cs/ww/en/view/Entry ID

\3\

Short title
Entry-ID: Entry ID, A5E Number, 05/2023 62

You might also like