63
A documentation paper issued by: Siemens. © Siemens AG 2011-2015. All rights reserved. Station Controller Installation and user manual Version: 2.0 (09.06.2015)

Station Controller Documentation - Siemens

  • Upload
    others

  • View
    33

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Station Controller Documentation - Siemens

A documentation paper issued by: Siemens. © Siemens AG 2011-2015. All rights reserved.

Station Controller

Installation and user manual

Version: 2.0 (09.06.2015)

Page 2: Station Controller Documentation - Siemens

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

2Documentation | Station Controller

Table of Contents

Table of Contents ............................................................................................. 2

List of Tables .................................................................................................... 5

1 Introduction .......................................................................................... 6

1.1 MLFBs ................................................................................................ 7

1.2 StatCon configuration tool ................................................................. 8

1.3 Restrictions ........................................................................................ 8

2 Requirements ........................................................................................ 9

2.1 Licensing............................................................................................ 9

2.2 Software Requirements ..................................................................... 9

2.2.1 Embedded System (Station Controller) .............................................. 9

2.2.2 Engineering Station ......................................................................... 9

2.3 Hardware Requirements .................................................................. 10

2.3.1 TIA/Step7 Controller ....................................................................... 10

2.3.2 PCS 7 Controller ............................................................................. 11

3 General Concept .................................................................................. 12

3.1 IEC 61850 MMS client ...................................................................... 12

3.2 IEC 61850 MMS server ..................................................................... 15

3.3 IEC 60870 slave ................................................................................ 15

3.4 IEC 60870 master ............................................................................. 15

4 Installation .......................................................................................... 16

4.1 Run MSI Installer .............................................................................. 16

4.1.1 Services ......................................................................................... 16

4.1.2 Firewall Settings ............................................................................ 16

4.2 Transfer licenses .............................................................................. 17

5 Hardware S7-mEC ................................................................................ 18

5.1 S7-mEC Display Elements and Interfaces ......................................... 18

5.2 S7-mEC Ethernet Interfaces ............................................................. 19

Page 3: Station Controller Documentation - Siemens

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

3Documentation | Station Controller

5.3 Expansion Module EM-PC ................................................................ 21

6 Engineering Restrictions/Rules ............................................................ 22

6.1 Synchronous Calling of EXEC_COM .................................................. 22

6.2 Third-party Software on the Station Controller ................................ 22

6.3 Remote Desktop Connection ............................................................ 22

6.4 Number of data points ..................................................................... 23

6.5 PLC cycle time, workload ................................................................. 23

7 Getting Started .................................................................................... 24

7.1 Assigning IP Address for IEC Interface (X2) ...................................... 24

7.2 Changing of IP adresses in an existing project ................................. 27

7.3 Step7 Engineering ........................................................................... 27

7.3.1 SIMATIC STEP 7 .............................................................................. 28

7.3.2 Hardware Configuration ................................................................. 29

7.3.3 S7 User Program ............................................................................ 31

7.4 StatCon Configuration ..................................................................... 34

7.4.1 Add StationController ..................................................................... 34

7.4.2 Configure client device ................................................................... 36

7.4.3 Configure IEC61850 server ............................................................. 41

7.4.4 Generate S7-Mapping .................................................................... 42

7.4.5 Save project ................................................................................... 43

7.4.6 Download configuration to StationController .................................. 43

7.4.7 Generate data block SCL source ...................................................... 44

7.5 S7 User Program .............................................................................. 45

7.6 Accessing the data ........................................................................... 47

7.7 Time synchronization ....................................................................... 47

8 Diagnosis ............................................................................................. 48

8.1 Status of function blocks ................................................................. 48

The Status output of the CREA_COMM block has to be 0x01 .......................... 48

Table 8: Error codes of CREA_COM block ........................................................ 48

Table 9: Error codes of EXEC_COM block ........................................................ 49

Page 4: Station Controller Documentation - Siemens

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

4Documentation | Station Controller

8.2 Tracing ............................................................................................. 49

9 Appendix ............................................................................................. 51

9.1 ntp.conf example ............................................................................. 51

9.2 StationController UDTs ..................................................................... 51

9.3 Error Codes of EXEC_COM block ....................................................... 59

9.4 IEC61850 Control Error Codes .......................................................... 61

Page 5: Station Controller Documentation - Siemens

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

5Documentation | Station Controller

List of Tables

Table 1: Station Controller MLFBs .................................................................................. 8

Table 2: Software requirements .................................................................................... 9

Table 3: Hardware requirements ................................................................................. 11

Table 4: Manuals ....................................................... Fehler! Textmarke nicht definiert.

Table 5: S7-mEC Display Elements ............................................................................... 19

Table 6: S7-mEC Ethernet Interfaces ........................................................................... 19

Table 7: EM-PC Interfaces ........................................................................................... 21

Table 8: Error codes of CREA_COM block ..................................................................... 48

Table 9: Error codes of EXEC_COM block ..................................................................... 49

Table 10: Trace Settings.............................................................................................. 49

Table 11: Station Controller UDTs ................................................................................ 53

Table 12: Detailed Description UDT2, UDT8 ................................................................. 53

Table 13: Detailed Description UDT3, UDT4 ................................................................. 54

Table 14: Detailed Description UDT5 ........................................................................... 55

Table 15: Detailed Description UDT6, UDT7 ................................................................. 55

Table 16: Detailed Description UDT8, UDT9, UDT10, UDT11, UDT12 .............................. 56

Table 17: Detailed Description UDT13, UDT14, UDT15, UDT16, UDT17 .......................... 57

Table 18: Detailed Description of UDT100 ................................................................... 58

Table 19: Detailed Description UDT1 ........................................................................... 59

Page 6: Station Controller Documentation - Siemens

6

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

The Station Controller Software is designed to enhance the SIEMENS S7 Soft-PLC WindowsLogic Controller RTX (WinLC RTX) with several industrial communication standards andprotocols.

Currently, the Station Controller can have the following communication protocols includ-ed:

· IEC 61850 MMS Server· IEC 61850 MMS Client· IEC 60870 Master· IEC 60870 Slave

Every communication protocol package works like an independent communication chan-nel and can exchange data between the accordingly communication partner and theWinLC RTX.

The Station Controller is designed to start up and work autonomously, so no display andcontrol devices are required after the basic installation.

1 Introduction

Figure 1 - Station Controller with Communication Protocols

Page 7: Station Controller Documentation - Siemens

7

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

1.1 MLFBs

Depending on the stacks required in the Station Controller, the following MLFBs are used:

MLFB PCS7 61850Client

61850Server

60870Slave

60870Master

9AE4100-1GC02 N/A - - - X

9AE4100-1GC01 N/A - - X -

9AE4100-1GC03 N/A - - X X

9AE4100-1GC10 N/A - X - -

9AE4100-1GC12 N/A - X - X

9AE4100-1GC11 N/A - X X -

9AE4100-1GC13 N/A - X X X

9AE4100-1GC20 N/A X - - -

9AE4100-1GC22 N/A X - - X

9AE4100-1GC21 N/A X - X -

9AE4100-1GC23 N/A X - X X

9AE4100-1GC30 N/A X X - -

9AE4100-1GC32 N/A X X - X

9AE4100-1GC31 N/A X X X -

9AE4100-1GC33 N/A X X X X

9AE4100-1GA02* - - - - X

9AE4100-1GA01* - - - X -

9AE4100-1GA03* - - - X X

9AE4100-1GA10* - - X - -

9AE4100-1GA12* - - X - X

9AE4100-1GA11* - - X X -

9AE4100-1GA13* - - X X X

9AE4100-1GA20* - X - - -

9AE4100-1GA22* - X - - X

9AE4100-1GA21* - X - X -

9AE4100-1GA23* - X - X X

9AE4100-1GA30* - X X - -

9AE4100-1GA32* - X X - X

9AE4100-1GA31* - X X X -

9AE4100-1GA33* - X X X X

9AE4100-1GB02* X - - - X

Page 8: Station Controller Documentation - Siemens

8

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

9AE4100-1GB01* X - - X -

9AE4100-1GB03* X - - X X

9AE4100-1GB10* X - X - -

9AE4100-1GB12* X - X - X

9AE4100-1GB11* X - X X -

9AE4100-1GB13* X - X X X

9AE4100-1GB20* X X - - -

9AE4100-1GB22* X X - - X

9AE4100-1GB21* X X - X -

9AE4100-1GB23* X X - X X

9AE4100-1GB30* X X X - -

9AE4100-1GB32* X X X - X

9AE4100-1GB31* X X X X -

9AE4100-1GB33* X X X X X

Table 1: Station Controller MLFBs

*Bundles will be discontinued in 10/2015

1.2 StatCon configuration tool

With the StatCon Tool the connection properties and the tag mapping entries of the Sta-tion Controller can be configured.

For further informations, please refer to the StatCon manual.

1.3 Restrictions

The usage of the Station Controller is not permitted within hydro power projects.

When in doubt, please contact:

Voith Hydro Holding GmbH & Co. KG

Research and Development Automation - haa

Alexanderstraße 11

89522 Heidenheim, Germany

Page 9: Station Controller Documentation - Siemens

9

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

The Station Controller with IEC 61850 / IEC 60870 Protocol Stacks has the following sys-tem requirements:

2.1 Licensing

The Licensing of the IEC communication stacks is handled via Automation License Manag-er Licenses. The communication stacks are licensed separately; a license certificate is in-cluded for every license, denpending on the MLFB ordered.

2.2 Software Requirements

The Station Controller Software requires the following software installed

2.2.1 Embedded System (Station Controller)

1 32 Bit Operating systems:

- Windows Embedded Standard Service Pack 3

- Windows Embedded Standard 7

Note: 64 Bit Operating systems are not supported!

2 SIMATIC Windows Logic Controller RTX (WinLC) Version 4.6 or higher

3 Automation License Manager V5.3 or higher

Table 2: Software requirements embedded System

2.2.2 Engineering Station

1 Step 7 V5.5 or higher /PCS 7 V8.0 or higher / TIA-Portal V12 or higher

Table 3: Software requirements Engineering Station

For Configuration of the communication protocols and for diagnosis of the Station Con-troller, the StatCon Configuration Tool is used. This Tool is included in the scope of deliv-ery of the Station Controller Software.

2 Requirements

Page 10: Station Controller Documentation - Siemens

10

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

2.3 Hardware Requirements

The Station Controller Software can be installed on the following devices. If a differentdevice (with installed WinAC RTX) should be used, please [email protected].

2.3.1 TIA/Step7 Controller

Device Description

Microbox IPC427D

MLFB: 6AG4140-..K.4-..B0

(B -> mit WinAC RTX)

(4 -> Windows Embedded Standard 7 SP1)

(K -> minimum RAM of 2GB with NVRAM)

Example 6AG4140-4BK14-0DB0

SIMATIC IPC427D (MICROBOX PC), HD GRAPHIC ONBOARD,2X10/100/1000 MBIT/S ETHERNET RJ45, 4 X USB V3.0 (HIGH CURRENT),PCIE (OPTIONAL), 24V DC POWER SUPPLY; PROCESSOR: CORE I3-3217UE;2 X GBIT ETHERNET (IE/PN); PROFIBUS DP 12; MOUNTING: MOUNTINGON DIN RAIL; MEMORY EXTENSION: 2 GB WITH NVRAM; EXTENSION(HW): 1X RS232; 1X PCIE; OPERATING SYSTEM: WIN EMBEDDED STAND-ARD 7, 32BIT; MASS STORAGE CHANGEABLE: W/O MASS STORAGECHANGEABLE; MASS STORAGE INTERNAL: CFAST 8 GB, WINAC RTX 2010SP2;

Microbox IPC427C Bundle

MLFB: 6ES7675-1D.31-..B0

(3 -> minimum RAM of 2GB)

(1 -> Windows Embedded Standard 7 SP1)

(B -> mit WinAC RTX)

Example 6ES7675-1DJ31-6AB0

SIMATIC IPC427C BUNDLE, WINCC FLEXIBLE 2008/WINAC, CONSISTINGOF: MICROBOX 6ES7671-1D...-.AA0; CORE2 DUO 1.2 GHZ, 800 MHZ FSB,1 X PN 1 PORT, 1 X IE 1 GBIT, SOFTWARE PREINSTALLED; 2 GBYTE DDR31066, SODIMM; WINDOWS EMBEDDED STANDARD 7; 4 GB COMPACT-FLASH INTERNAL; WITHOUT ACCESSIBLE STORAGE; (ONLY WITH INTER-NAL STORAGE); WINAC RTX 2010;

SIMATIC S7-MODULAR EM-BEDDED CON-TROLLER

MLFB: 6ES7677-1DD10-0BB0

SIMATIC S7-MODULAR EMBEDDED CONTROLLER, EC31-RTX, EC31 HW(6ES7677-1DD10-0BA0) WITH 1 GB RAM, 4 GB FLASH DISK AND PREIN-

Page 11: Station Controller Documentation - Siemens

11

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Table 4: Step7 / TIA Controller

2.3.2 PCS 7 Controller

Device Description

SIMATIC PCS 7AS RTX

MLFB: 6ES7654-0UE13-0XX0

SIMATIC PCS 7 AS RTX AUTOMATION SYSTEM BASED ON IPC427C, CORE2DUO 1.2 GHZ, 800 MHZ FSB, 3MB SLC, 2 GB DDR3 1066 SODIMM RAM, 4GB COMPACT-FLASH CHANGEABLE, CP5611 ONBOARD, WINDOWS EM-BEDDED STANDARD 2009, WINAC RTX 2010 SOFTWARE CONTROLLER,RUNTIME LICENSE AS PO100 PREINSTALLED FOR PCS 7 OPERATING, AP-PLICABLE EX PCS 7 V7.1 SP2 OR HIGHER

SIMATIC PCS 7AS MEC RTXCONTROLLER

MLFB: 6ES7654-0MC23-0XX0

SIMATIC PCS 7 AS MEC RTX CONTROLLER, EC31- RTX, EC31 HW(6ES7677-1DD10-0BB0), 1GB RAM, 4 GB FLASH DISK, SCHNITTSTELLEN:2X PROFINET, 1X FAST ETHERNET, 2X USB, MMC SLOT, WINDOWS EM-BEDDED STANDARD 2009, SOFTWARE LIZENZEN SIMATIC WINAC RTX2010, SIMATIC SOFTNET-S7/LEAN, SIMATIC PCS 7 RTX, RUNTIME LICENSEAS PO100 UND INDUSTRY LIBRARY V8.0 RUNTIME LICENSE (1AS)

Optional:Expansion module EM-PC 6ES7677-1DD50-2AA0This module is recommended if an additional interface for the protocolstacks is required, or if a display/mouse/keyboard should be connectedfor diagnosis

SIMATIC PCS 7AS RTX

MLFB on request

SIMATIC PCS 7 AS RTX AUTOMATION SYSTEM BASED ON IPC427D

Table 5: PCS 7 Controller

STALLED SW: WINDOWS EMBEDDED STANDARD; SIMATIC WINAC RTX,SIMATIC SOFTNET-S7/ LEAN, INTERFACES: 1. IF: 2X PROFINET, 2. IF: 1XFAST ETHERNET, 3. IF: 2 X USB, MMC SLOT, DOCUMENTATION ON DVD,RESTORE DVD

Optional:Expansion module EM-PC 6ES7677-1DD50-2AA0This module is recommended if an additional interface for the protocolstacks is required, or if a display/mouse/keyboard should be connectedfor diagnosis

Page 12: Station Controller Documentation - Siemens

12

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

3 General Concept

3.1 IEC 61850 MMS client

With the IEC 61850 MMS Client package, the Station Controller acts as IEC 61850 MMSClient. Contrary to other well-known industrial communication protocols, IEC 61850 fol-lows the principle “virtualization”. The real substation is represented by virtual devices,nodes, objects and attributes. Therefore IEC 61850 is an object-oriented standard, whichcontains semantic information in the naming of the “variable”. An IED (Intelligent Electron-ic Device) as MMS Server consists of Logical Devices (LD), which contain Logical Nodes(LN), which contain Data Objects (DO). Data Objects contain data attributes (DA). DataAttributes can be organized again in structures. The actual variable value always is foundin an attribute. (E.g. stVal in figure 2)

The IEC 61850 MMS Client package can connect to several MMS Server devices.

An XML-based configuration file is used to describe the IEC 61850 MMS Client with itsconnections, accessed variables and communication settings. Each variable contains map-ping information for the Station Controller to map IEC 61850 tags to SIMATIC exchangeDBs residing in the WinLC RTX.

Figure 2 - Station Controller as IEC 61850 MMS Client: General Concept

Page 13: Station Controller Documentation - Siemens

13

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

After starting the controller with the XML configuration file, the Station Controller re-quests the data, defined in the configuration file from the IEC 61850 MMS Clients. Themapping entries for each IEC 61850 tag, containing the exchange DB number/offset con-figures the variable organisation in the WinLC controllers exchange DB.

IEC 61850 tag: IEC_002CTRL/Q0XCBR1$ST$Pos corresponds to exchange DB 1000 offset100 with data name: Q0XCBR1_Pos

Figure 3 shows a part of the configuration file used in the example in figure 3, describingthe mapping between the IEC 61850 tag and the SIMATIC exchange DB number/offset.The first line shows the LN (Logical Node) path definition: IED_002/CTRL/Q0XCBR1

· IED_002: IED Name,

· CTRL: Logical Device (LD),

· Q0XCBR1: Circuit Breaker 1 (LN).

The LN contains several DOIs (Data Object Instance). One DOI is represented by the objectPos (Position of the Circuit breaker), where the attribute instance (DAI) stVal representsthe actual position.

The mapping information is encapsulated in so-called private section, initiated by the tag<Private type=”IEC_Services”>.

The mapping part defines the type of variable, the DB number, as well the offset withinthe DB. The IEC 61850 variable value resides in the WinLC RTX controller in the named DBat the named offset.

Several types can be defined, which correspond to UDTs (User Defined Types) in the WinLCRTX controller.

Page 14: Station Controller Documentation - Siemens

14

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 3 - Mapping Section Example

Page 15: Station Controller Documentation - Siemens

15

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

3.2 IEC 61850 MMS server

With the IEC 61850 MMS Server license, the Station Controller acts as IEC 61850 MMSServer. The package follows the same principles as of the IEC 61850 MMS Client, whichhave been explained in chapter 3.1.

An XML-based ICD-file (IED Capable Description) is used to describe the IEC 61850 MMSServer (IED) with its Logical Devices, Logical Nodes, Data Objects and Data Attributes.Special mapping information for the Station Controller to map IEC 61850 tags to SIMATICDBs residing in the WinLC RTX is done using so-called private sections.

After starting the controller with the ICD-file, the Station Controller serves the data, de-fined in the ICD file for IEC 61850 MMS Clients. The private sections handle the mappingfrom IEC 61850 tag to SIMATIC exchange DB number/offset, like show in the example inFigure 2.

IEC 61850 tag: IEC_002CTRL/Q0XCBR1$ST$Pos corresponds to exchange DB 1000 offset100 with data name: Q0XCBR1_Pos

Mapping works just like with the IEC 61850 MMS Client. The IEC 61850 MMS Server uses itto define for example the type of variable, the DB number, as well the offset and so on.

Several types can be defined, which correspond to UDTs (User Defined Types) in the WinLCRTX controller.

3.3 IEC 60870 slave

With the IEC 60870-5-104 Slave license, the Station Controller acts as IEC 60870-5-104Slave device. The package follows the same principles as of the IEC 61850 MMS Client andServer, which have been explained in chapter 3.1 and 3.2.

An XML-based configuration file created with the StatCon Configuration Tool is used todescribe the data to be provided by the slave device. This file also contains the mappinginformation for the Station Controller to map the tags to SIMATIC DBs residing in theWinLC RTX.

Several data types can be defined, which correspond to UDTs (User Defined Types) in theWinLC RTX controller.

3.4 IEC 60870 master

With the IEC 60870-5-104 Master license, the Station Controller acts as IEC 60870-5-104Master device. The package follows the same principles as the other packages IEC 61850Client/Server, IEC 60870 Slave.

The xml configuration file for the IEC 60870 Master needs to be created manually. Forhelp, please contact [email protected] .

Several data types can be defined, which correspond to UDTs (User Defined Types) in theWinLC RTX controller.

Page 16: Station Controller Documentation - Siemens

16

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

4.1 Run MSI Installer

The Station Controller Software is installed via an MSI Installer Application. This can befound on the delivered USB Stick (folder “Install Station Controller Software”).

Important notes:

- Please ensure that the enhanced write filter of the system is disabled for volumesC:\ and D:\

The Installation procedure installs the following files and folders:

- C:\Siemens Application folder for binary files

- D:\Siemens\log Folder for log files

- D:\Siemens\etc Folder for configuration files

4.1.1 Services

The following services are installed and started during installation:

Service name Description

S7mEC IEC Services IEC communication Service

UpdateIECServices Service for Firmware Update and Commu-nication with StatCon Configuration Tool

4.1.2 Firewall Settings

The following firewall settings are made during installation

Firewall Setting Description

add allowedprogram C:\Siemens\bin\S7meC_Exe.exeS7meC_Exe ENABLE

Add Service to allowed pro-grams

add allowedprogram C:\Siemens\bin\S7meC_Service.exeS7meC_Service ENABLE

Add Exe to allowed programs

add allowedprogram C:\Siemens\bin\UpdateService.exeUpdateService ENABLE

Add Update-Service to allowedprograms

add portopening UDP 3008 UpdateServiceUDP ENABLE Open port for firmware update

4 Installation

Page 17: Station Controller Documentation - Siemens

17

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

add portopening TCP 5007 Update service ENABLE Open port for firmware update

4.2 Transfer licenses

After the installation, you can transfer the licenses for the communication stacks includedfrom the USB-Stick to the hard drive of the embedded system with the Automation LicenseManager:

Figure 4: Transfer licenses

Important Note:

Older Versions of the Automation License Manager are not able to read the Station Con-troller licenses. In this case please update the Automation License Manager with the Ver-sion stored on the USB-Stick.

Page 18: Station Controller Documentation - Siemens

18

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

This chapter describes the hardware S7-mEC, which is delivered within the Scope of thebundle packages. If the Software solution is used, please refer to the documentation ofthe separately purchased hardware (e.g. Microbox IPC427).

5.1 S7-mEC Display Elements and Interfaces

Figure 4 shows the interfaces of the S7 modular Embedded Controller. This manual intro-duces to the most important elements. For further information refer to the manuals.

Figure 5 - Interfaces S7-mEC

No Element

1 LED display

2 Slot for the Multi Media Card, including the ejector

3 Mode selector switch

4 MAC address of the standard Ethernet controller (X2 P1 PN/IE (LAN))

5 USB 2.0 ports

6 Power supply connection

7 Product variant identification: BB (EC31-RTX) / FB (EC31-RTX F)

8 X1 PROFINET IO interface (as submodule of WinAC), Via this Interface, NO IECconnection is possible

9 X2 Ethernet Interface IE General (IEC Interface). This interface is used for IEC

5 Hardware S7-mEC

Page 19: Station Controller Documentation - Siemens

19

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

61850/60870 connections and connection to StatCon tool

Table 6: S7-mEC Display Elements

The power supply (6) has to be connected with 24V DC. The system will boot up. At theend of the boot procedure no LED is blinking anymore.

Now the mode selector switch has to be switched to RUN.

5.2 S7-mEC Ethernet Interfaces

Figure 6 - S7-mEC Ethernet Interfaces

No Interface Description

1 X2 P1 PN/IE (LAN) RJ45 Ethernet port 10/100 Mbps; Interface for programmingdevice; Auto-crossover not supported. IEC connections sup-ported via this interface

2 X1 PN (LAN) P1

X1 PN (LAN) P2

Two RJ45 PROFINET ports 10/100 Mbps, 90° angle connectorrequired, Auto-crossover supported. IEC connections NOTsupported via this interface

3 DC24V Power supply connection (Connector included in delivery)

4 X60/61 USB 2x USB 2.0 ports, 500mA for USB devices

Table 7: S7-mEC Ethernet Interfaces

The Station Controller has to be connected to the following Ethernet Networks:

1. The IEC 61850 Network has to be connected to port X2(1).

2. The SIMATIC Network has to be connected to port X1(2) or X2(1).

Note:

Page 20: Station Controller Documentation - Siemens

20

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

If an IEC connection is running on the Port X2(e.g. IEC 61850 server), there is no connec-tion from Step7 side via this interface possible. This means the Step7 communication hasto be established via the interface X1.

Page 21: Station Controller Documentation - Siemens

21

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

5.3 Expansion Module EM-PC

The Gigabit Ethernet Port of the Expansion module EM-PC can be used for an additionalIEC interface of the Station Controller.

No Interface Description

1 X30 Serial interface V.24 (RS232)

2 X50 SD/MMC Combination slot for SD or Multi Media Card with ejector

3 X51 CF Slot for CompactFlash card

4 X60/X61 USB 2x USB 2.0 high-speed

5 X1 P1 PN (LAN) Gigabit Ethernet connection

6 MAC address

7 X70 DVI-I graphics interface

9 LED displays

Table 8: EM-PC Interfaces

If the PC Expansion Module is used, it has to be plugged to the left side of the EX31-RTXbefore power-on.

A monitor can be connected to interface (7), mouse and keyboard can be connected tointerface (4).

Figure 7 - EM PC Display Elements and Interfaces

Page 22: Station Controller Documentation - Siemens

22

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

6.1 Synchronous Calling of EXEC_COM

The call of the IEC service-DLL within the Step7 project is per default a synchronous call.This means that the “EXEC_COM” SFB waits for the DLL to complete its operation. This alsomeans that while the DLL is working, no other cyclic OBs can interrupt.

This synchronous way of calling is highly recommended for the data consistency in theprogram!

There is also the possibility to call the DLL asynchronously with the SFB65003, where theprogram continues while the DLL is working. In the next cycle, the calling SFB checks if theDLL has finished.

In this case there have to be mechanisms to ensure the consistency of the data in the Ex-change DB.

6.2 Third-party Software on the Station Controller

It is not allowed to run third-party software on the Station Controller, except of the toolswhich are already installed after delivery.

Third party tools can affect the performance of the IEC Services on the Station Controller.Furthermore, if the IEC Services are called synchronously, can affect the cycle time ofthe S7-program!

6.3 Remote Desktop Connection

The remote desktop service is disabled per default on the Station Controller. This is be-cause a remote desktop connection can affect the performance of the IEC Services on theStation Controller. Furthermore, if the IEC Services are called synchronously, can affectthe cycle time of the S7-program!

For Engineering of the StationController (e.g. for IP configuration of the optional EM-PCmodule), remote desktop can be required.

For this use cases, remote desktop can be activated from StatCon Configuration Tool byright click on the Station Controller, “Online & Diagnostics”. There is a button “Enable Re-mote Desktop” which activates the Remote Desktop Connection for 30 minutes on the Sta-tionController.

This is only recommended in the engineering phase!

6 Engineering Restrictions/Rules

Page 23: Station Controller Documentation - Siemens

23

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 8 – Enable Remote Desktop Button

6.4 Number of data points

The maximum number of IEC data points per connection is 2000. This means if aIEC61850 client is configured, 2000 data points can be read from every connectedIEC61850 server (e.g. protection device).

The maximum number of data points overall is 10000. This means if an IEC61850 client isconfigured, 10000 data points can be configured overall, but not more than 2000 datapoints from a single IEC61850 server.

6.5 PLC cycle time, workload

The recommended cycle time of the IEC Service DLL in the WinAC program is 100ms-200ms (OB35,OB34).

The workload of the WinAC program should not exceed 50%.

Page 24: Station Controller Documentation - Siemens

24

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

This Chapter describes how to set up the Station Controller and how to configure the MMSClient with the StatCon Configuration Tool.

7.1 Assigning IP Address for IEC Interface (X2)

After S7-mEC startup, the IP address and subnet of the IE Network card (X2 P1 PN/IE(LAN)) used for the communication in the IEC 61850 network has to be assigned.

This can be done using SIMATIC Manager.

Open ‘PLC’ -> ‘Edit Ethernet Node’ and click ‘Browse’. A list of available S7 devices appears.

Choose your Station Controller (Device type “S7-mEC” for IEC Interface) and click OK.

7 Getting Started

Page 25: Station Controller Documentation - Siemens

25

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

You can now assign the IP configuration to your demands.

Page 26: Station Controller Documentation - Siemens

26

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Page 27: Station Controller Documentation - Siemens

27

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.2 Changing of IP adresses in an existing project

To change the IP-addresse(s) of the Station Controller, the following steps have to be pro-cessed. The order is important, the steps must not be swapped/mixed.

1. In the Simatic Manager click on „PLC“/„Edit Ethernet Node“ and choose the IECInterface in the list (S7-mEC)

2. Assign the desired IP-address to the IEC Interface. Sometimes an error messageappears, even if the assignment is successful.

3. Wait approximately 20 seconds

4. Check the IP-address with searching again in the „Edit Ethernet Node“ dialog

5. Change the IP-addresse(s) of the 2 Interfaces in the HW-Konfig (IEC, Profinet-Interface)

6. Download the Hardware Configuration via the new IP-address of the IEC Interface

7. Adapt the IP-address in StatCon (In StatCon only the IEC Interface is used)

8. Save the StatCon project

9. Close StatCon and reopen it

10. Download the configuration with StatCon

7.3 Step7 Engineering

Figure 9 - Step7 new project

Page 28: Station Controller Documentation - Siemens

28

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.3.1 SIMATIC STEP 7

There are several demo projects available on the CD-ROM that is provided with the StationController. A new project is created as follows:

1. Create a new SIMATIC Step 7 project.

2. Insert a PC Station.

Mouse right click / Insert New Object / SIMATIC PC Station

Figure 10 - Insert SIMATIC PC Station

Page 29: Station Controller Documentation - Siemens

29

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.3.2 Hardware Configuration

Open HW Config and insert the appropriate S7-mEC Controller in Slot 2; therefore use theHW Catalog.

· Navigate to: SIMATIC PC Station / Controller / S7 modular Embedded Controller /EC31 and drag and drop the controller to slot 2.

· Assign an IP address and subnet mask to the S7-mEC controller PN network inter-face. (X1 PN (LAN) P1/ X1 PN (LAN) P2)

Then insert a IE General device in slot 3.

Therefore, in the HW Catalog

Figure 11 - HW Config: Insert EC31 Controller

Page 30: Station Controller Documentation - Siemens

30

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

· Navigate to: SIMATIC PC Station / CP Industrial Ethernet / IE General / SW V 7.1 anddrag and drop the IE card to slot 3.

Then assign the IP address and subnet of the IE Network card (X2 P1 PN/IE (LAN)) used forthe communication in the IEC 61850 network and for StatCon, configured in the controllerin section 3.4.

Figure 13 Assign IP Address to IEC General interface

Compile and download the Hardware configuration using the IP Address of X2 Interface(IE-General).

Figure 12 - HW Config: Insert IE General

Page 31: Station Controller Documentation - Siemens

31

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.3.3 S7 User Program

7.3.3.1 Copying the SC_DRV library blocks

The Step7 application running in the WinLC RTX uses global data blocks to handle the dataexchange between the WinLC RTX controller and the IEC61850 MMS Client application.

The used FBs (Function Block) and UDTs (User Defined Types) are included in the blocklibrary available on the CD-ROM.

· Retrieve the block library

· Copy the content of the library to the current project, like shown in figure 17.

Figure 14 - Copy Content from StationControllerLibrary to Project

7.3.3.2 Exchange data block

The database containing all mapped variables is represented by a DB block. The DB num-ber and the name can be chosen freely. The structure of the exchange data block is gener-ated by StatCon (SCL source code of the data block).

To initially add the exchange data block, create a data block in your project.

Page 32: Station Controller Documentation - Siemens

32

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.3.3.3 Interface CFC

The interface logic to exchange data between the IEC protocol stacks and the PLC (WinLCRTX) is implemented with a CFC chart.

· Add a new CFC Chart

· Place the SFC CREA_COM into the CFC chart (OB 100, OB 102)

· Assign the Interface DLL name on the input “PROGID:'*dll:C:\Siemens\bin\CCX_IEC_Interface.dll'

· Place the SFC EXEC_COM into the CFC chart (e.g. OB 35)

· Connect the CREA_COM`s Output “STATUS” with the Input “OBJHandle” of the EX-EC_COM block

· Assign the number of the exchange DB to the Input “Command” of the EXEC_COMblock (number in hex)

· Connect the “InputData” Input of the EXEC_COM block with the exchange DB (e.g.DB 1000). Mouse right click to “InputData” / Interconnection to Address / Select ex-change DB

· Connect the “OutputData” Input of the EXEC_COM block with the exchange DB (e.g.DB1000). Mouse right click to “InputData” / Interconnection to Address / Select ex-change DB

Page 33: Station Controller Documentation - Siemens

33

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.3.3.4 StationController UDTs

As explained in the chapter 3 General Concept the mapped IEC 61850 variables reside inthe exchange DB at a dedicated offset. Every IEC 61850 variable consists of several attrib-utes. The Station Controller supports different types of variables with different attributes.These attributes are arranged subsequently in the DB, starting with a DB offset (in byte).

To enhance the usability, the Station Controller comes with a set of UDTs, which can as-signed to a memory area with the IEC 61850 variable offset to make the attributes visible.

The UDTs are explained in detail in the Appendix of this document.

Figure 15 - Interface CFC

Page 34: Station Controller Documentation - Siemens

34

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.4 StatCon Configuration

Starting StatCon the first time, a blank workspace is shown, because no project file hasbeen opened.

A new project will be created by choosing “File”à “New Project” from the main menu. Thisopens a new workspace, where all panels are blank. On a first step, the system environ-ment has to be configured for the new project.

7.4.1 Add StationController

To add a new StationController to the project, choose “Add StationController” from theStationControllers context menu (right mouse click inside the StationControllers panel, seeFigure 16).

Figure 16 - Add StationController

Page 35: Station Controller Documentation - Siemens

35

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

This creates the new StationController and shows the dialog inside the properties panel(see Figure 17).

The new StationController has to be named unique within the project, e.g. “StationCon-troller”.

Selecting the “IEC61850 Client” or “IEC61850 Server” generates the appropriate MLFB au-tomatically. The MLFB cannot be changed by hand.

The IP address of the StationController (X2, IE General) has to be configured for download-ing the configuration to the StationController later.

One data block number (e.g. 1000) will be required at least for the S7-Mapping. Datablock number can be defined as a comma separated list.

Figure 17 - Create new StationController properties

The properties can be modified by selecting the corresponding field.

Selecting the “IEC61850 Client” stack of the “StationController” opens its correspondingtag selection (list of IEC61850 tags) inside the details panel and its properties inside theproperties panel (see Figure 18). Both, the tag list and the stack properties, are empty,because no data has been added to the IEC61850 client stack yet.

Selecting the “IEC61850 Server” or IEC60870 Slave stack behaves the same.

Page 36: Station Controller Documentation - Siemens

36

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

As a next step, a communication partner (e.g. an IEC61850 server device) has to be creat-ed as a data basis for the IEC61850 client.

Figure 18 - New IEC618650 client stack

7.4.2 Configure client device

7.4.2.1 Add external IEC61850 server device

To add a new external IEC61850 server device (e.g. SJ633) to the project, choose “Addexternal IEC61850 server device” from the external devices context menu (right mouseclick inside the external devices panel, see Figure 19).

Figure 19 - Add external IEC61850 server device

This opens the “IEC61850 server properties” dialog inside the properties panel for the newcreated external server device (see Figure 20).

The new IEC61850 server device has to be named unique within the project, e.g. “SJ633”.

Import the corresponding ICD file of the server device and select afterwards the desiredIED name within the dropdown list. All appropriate parameters, defined inside the ICD file,will be filled in automatically.

Page 37: Station Controller Documentation - Siemens

37

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

The “Max. connections” parameter defines the maximum number of connections to theIEC61850 server device, allowed to be configured by StatCon. Thus, one connection willbe required at least, to setup one IEC61850 client communicating with this server device.

Figure 20 - Create new IEC61850 server panel

The new external device will be shown, as a new entry inside the external devices panel,referencing the new IEC61850 server device.

Page 38: Station Controller Documentation - Siemens

38

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.4.2.2 Add IEC61850 tags to the IEC61850 client

New tags will always be added to the selected protocol stack.

Selecting the desired protocol stack within the StationDevices panel, e.g. “StationControl-ler” à “IEC61850 Client”, opens its tag list inside the details panel. Only StationControllercan have a protocol stack.

All available IEC61850 server devices are listed in the dropdown list inside the Device Datapanel. The data structure of the chosen server device will be shown below the dropdownlist as a tree view. Any data attribute of the server device can be added as an IEC61850 tagto the selected IEC61850 client. Therefore choose “Add” from the context menu of the se-lected data attribute within the tree view or press the Enter key. This step is shown in Fig-ure 21 for the controllable data attribute “IED_0002CTRL/Q0CSWI1$CO$Pos$Oper$ctlVal”(Control of circuit breaker).

Figure 21 - Add data attribute to IEC61850 client stack

There is another way to add the tag to the protocol stack. You can select a tag and drag itwith the mouse into the details panel (see Figure).

Page 39: Station Controller Documentation - Siemens

39

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 22 – Add a tag with drag and drop

If possible, the new IEC61850 tag will be listed now within the tag list of the selected pro-tocol stack (see Figure).

Figure 23 - Newly created IEC61850 tag

The equipment identification code (EIC), assigned to the tag by default, consist of the dataattribute name and any ID. It’s recommended to change the EIC to any context specificvalue, e.g. “Ctrl0”. This can be done by editing the EIC directly inside the tag list (see Fig-ure 24) or by editing the tag properties.

Figure 24 - Edit the equipment identification code

Afterwards, the measured value “IED_0002MEAS/MMXU1$MX$A$phsA$cVal$mag$f” canbe added in the same way. Selecting the value within the tag list, opens its properties in-side the properties panel (see Figure 25).

Change the EIC to e.g. “Current” and select “StatusFloat” as variable-type, to receive thequality and timestamp of the measured value as well.

Page 40: Station Controller Documentation - Siemens

40

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 25 - IEC61850 tag properties

As shown in Figure 25, the S7-Mapping parameters (Data block number, Data block offset)are set to “-1” by default. This implies that the S7-Mapping is still unspecified. These pa-rameters will be adapted during S7-Mapping generation (see 7.4.4).

Furthermore it can be seen, that an IEC61850 dataset (“NewDataset1_F”) had been creat-ed and assigned to the tag by default. “_F” within the name of the dataset indicates thatthis dataset will be preferred for float values. All further dataset details can be looked upand edited within the properties of the IEC61850 client stack of the StationController (seeFigure 26).

Page 41: Station Controller Documentation - Siemens

41

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 26 - IEC61850 dataset properties

7.4.3 Configure IEC61850 server

This chapter describes the configuration of the IEC 61850 server stack. This is not requiredif you use only the IEC 61850 client.

To start work with the IEC61850 server stack make sure the IEC61850 Server checkbox(see Figure 17) is checked.

7.4.3.1 Add IEC61850 tree nodes to the IEC61850 server

Server devices accept different tree node types in comparison to client devices. First it isnecessary to add the whole logical device (e.g. TEMPLATE_Minimal) to the controller. Thiscan be done by selecting a correspond node and dragging it to the object tree (see Figure28). After that the logical nodes of the logical device can be inserted, deleted and config-ured as they are needed.

Figure 27 - IEC61850 server object tree, new node

At this step you should create a final tree structure for your selected server device. At anycase you have the possibility to modify the tree later.

Page 42: Station Controller Documentation - Siemens

42

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Tags can be chosen from the “Data structure” panel. You can choose either an externaldevice with a defined ICD file or a template from the drop down menu. For further info seechapter “7.4.2.1 Add external IEC61850 server device”

Modifying the tags and nodes works the same way as it would with tags in a client device,see chapter “7.4.2.2 Add IEC61850 tags to the IEC61850 client” for further information.You cannot the structure of the logical objects. You cannot delete or insert single attrib-utes for example “stVal” or “q”.

7.4.4 Generate S7-Mapping

The S7-Mapping can be auto generated for the StationController using “Generate S7-Mapping” from the StationControllers context menu (see Figure 28).

Figure 28 - Generate S7-Mapping

This means that all mappable entities, where the S7-Mapping parameters are still unspeci-fied, will be mapped to the data blocks, specified within the StationController properties.

The progress of this process can be viewed inside the log panel (see Figure 29). Existingmapping definitions will be kept unchanged but validated before new mappings will beset. All errors, found during the validation, will be listed in the log panel as well.

Figure 29 - Log panel with S7-Mapping result

When the S7-Mapping is done, the result can be seen inside the entity properties, wherethe appropriate mapping parameters are set (see Figure 30 for e.g. the “Ctrl0” tag).

Page 43: Station Controller Documentation - Siemens

43

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 30 - IEC61850 tag properties with specified S7-Mapping parameters

7.4.5 Save project

Before downloading the configuration to the StationController, the project has to besaved. The project will be saved by choosing “Project”à “Save Project” from the mainmenu. This opens the “Save Project As …” dialog, where the project location has to be se-lected and the project name has to be defined. These settings will be applied by pressingthe “OK”-Button and the project will be saved according to the data structure described inFehler! Verweisquelle konnte nicht gefunden werden..

7.4.6 Download configuration to StationController

The configuration can be downloaded to the StationController using “Download to device”from the StationDevices context menu (see Figure 31). It’s required to save the projectbefore downloading the configuration to the StationController.

Figure 31 - Download to device command

Page 44: Station Controller Documentation - Siemens

44

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

This opens the “Download Configuration to StationController” dialog inside the detailspanel (see Figure 32). Inside this dialog, the protocol stacks, which shall be downloaded,have to be selected. All stacks are selected by default.

The download can be started by the “Download configuration to StationController” button.The state of the download will be shown by an icon inside the column “State” and by ap-propriate entries inside the log panel.

Figure 32 - Download configuration to StationController

7.4.7 Generate data block SCL source

The S7 user program requires the SCL source of the data block, matching the generatedS7-Mapping. This data block SCL source code can be generated by the “Write data blockSCL description [..]” button above the “Download configuration [..]” button (see Figure32).

This writes the SCL source code for each data block, used by the S7-Mapping, to a SCL file(e.g. “DB1000.scl”) inside the folder of the corresponding StationController (<project fold-er>/002_StationControllers/StationController<x>/). The exact path of each successful gen-erated SCL file will be given inside the log panel (see Figure 33).

Figure 33 - SCL done inside log panel

Figure 34 shows the SCL source code of the data block DB1000 matching the configura-tion of the previous chapters.

Page 45: Station Controller Documentation - Siemens

45

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 34 - generated SCL code of data block DB1000

7.5 S7 User Program

The data block generated by StatCon has to be copied to the S7 user program as suggest-ed in 0. Download DBs always with “CFC download”. If applicable remove the existing datablock source of DB1000 from the S7 project. Insert afterwards the DB1000.scl generatedby StatCon (as shown in Figure 35) to the S7-Programm sources folder.

Figure 35 - insert data block source

Another way to import the SCL source into the Step 7 project is to copy the complete con-tent of the scl file into the existing source of the exchange DB (overwrite old).

Next the source has to be compiled as shown in Figure 36.

Page 46: Station Controller Documentation - Siemens

46

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Figure 36 - compile DB1000

Step7: Change to the “Blocks” folder of the S7-Program and download the DB1000 to theStationController as shown in Figure 37.

PCS7: Compile and Download CFC Charts. The data can now be accessed in the data block.

Figure 37 - download DB1000

Page 47: Station Controller Documentation - Siemens

47

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

7.6 Accessing the data

To access the data in the CFC Charts, the DB data can be used directly or via the providedfunction blocks in the SC_DRV library.

Example for Boolean:

- add the function block “IC_STATUS_BOOL” (Input Direction, Client, Status Bool) toyour CFC Chart

- Connect the UDT in the DB via right clicking the Input “IN”, “Interconnection to Ad-dress” and selecting the correct Data in the DB

Figure 38 - CFC Chart

7.7 Time synchronization

The Station Controller can be synchronized with a common NTP time server. This serverhas to be located in the IEC network (connected to Ethernet Port X2 P1 PN/IE (LAN). Thetime is configured as UTC (no time zone). A NTP Client is already installed on the StationController. The configuration file is automatically downloaded if present in the StatConproject folder under \002_StationControllers\Your Station Controller\ntp.conf .

It is recommended to use Step7 Time Synchronization mechanisms for WinAC time (con-figured in Step-7 HW Config).

Page 48: Station Controller Documentation - Siemens

48

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

8.1 Status of function blocks

To verify the general functionality of the connection between the WinAC and theIEC61850 server, the status of the function blocks CREA_COMM and EXEC_COMM can bechecked.

The Status output of the CREA_COMM block has to be 0x01

The Status output of the EXEC_COMM block has to be 0x00

Table 9: Error codes of CREA_COM block

8 Diagnosis

Page 49: Station Controller Documentation - Siemens

49

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Table 10: Error codes of EXEC_COM block

8.2 Tracing

The IEC61850 Services (Client/Server) create a Trace file. The trace filter and the locationof the trace file can be configured in the configuration fileD:\Siemens\etc\ieccomm.properties.

The following settings are important and can be changed by the user:

Setting Description Default value

log4j.appender.file.File Path of the trace file D:\logs\trace.log

log4j.appender.file.Threshold Trace fil-ter(DEBUG,INFO,WARN,ERROR)

WARN

log4j.appender.file.MaxFileSize Maximum size of thetrace file

20MB

Table 11: Trace Settings

Page 50: Station Controller Documentation - Siemens

50

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

ieccomm.properties example:

log4j.rootLogger=INFO, file

# Set options for appender named "file"

log4j.appender.file=RollingFileAppender

log4j.appender.file.File=D:\\Siemens\\log\\errors.log

log4j.appender.file.append=true

log4j.appender.file.Threshold=WARN

log4j.appender.file.MaxFileSize=20MB

log4j.appender.file.MaxBackupIndex=1

log4j.appender.file.layout=PatternLayout

#TIMESTAMP LEVEL [THREAD_LOGGER] {CLASS_METHOD} (FILE_LINE) - MESSAGE(new line)

#%d %p [%t_%c] {%C_%M} (%F_%L) - %m%n

log4j.appender.file.layout.ConversionPattern=%d %p [%c]: %m%n

Page 51: Station Controller Documentation - Siemens

51

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

9.1 ntp.conf example

# NTP Network Time Protocol

# please check http://www.ntp.org for additional documentationand background information

# Use drift file, do not modify it if not sure

driftfile "C:\Program Files\NTP\etc\ntp.drift"

# Use specific NTP servers

server 140.80.62.75 iburst

# End of generated ntp.conf

9.2 StationController UDTs

The following UDTs are supported:

Name Symbolic Name Description

UDT1 UDT_QUALITY Type is used internally in other STA-TUS/CONTROL UDTs to resolve the qualitycode

UDT2 UDT_STATUS_BOOL Describes boolean status variable withquality code and timestamp. Correspondsto “status-boolean” in ICD configurationfile

UDT3 UDT_STATUS_DINT Describes integer32 status variable withquality code and timestamp. Correspondsto “status-integer” in ICD configuration file

UDT4 UDT_STATUS_FLOAT Describes float status variable with qualitycode and timestamp. Corresponds to “sta-tus-float” in ICD configuration file

UDT5 UDT_CONTROL_BOOL Describes boolean control variable withtimestamp. Corresponds to “control-boolean” in ICD configuration file

UDT6 UDT_CONTROL_DINT Describes integer32 control variable withtimestamp. Corresponds to “control-

9 Appendix

Page 52: Station Controller Documentation - Siemens

52

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Name Symbolic Name Descriptioninteger” in ICD configuration file

UDT7 UDT_CONTROL_FLOAT Describes float control variable withtimestamp to read discrete attributes. Cor-responds to “control-float” in ICD configu-ration file

UDT8 UDT_GEN_READ_BOOL Describes boolean variable without addi-tional information to read discrete attrib-utes. Corresponds to “read-boolean” in ICDconfiguration file

UDT9 UDT_GEN_READ_DINT Describes integer32 variable without addi-tional information to read discrete attrib-utes. Corresponds to “read-integer” in ICDconfiguration file

UDT10 UDT_GEN_READ_FLOAT Describes float variable without additionalinformation to read discrete attributes.Corresponds to “read-float” in ICD configu-ration file

UDT11 UDT_GEN_READ_BITSTR Describes bitstring variable without addi-tional information to read discrete attrib-utes. The bitstring variable is converted totype dword. Corresponds to “read-bitstring” in ICD configuration file

UDT12 UDT_GEN_READ_STRING Describes string variable without addition-al information. First 2 data bytes describesthe string length. Maximum string lengthis restricted to 62 bytes. Corresponds to“read-string” in ICD configuration file

UDT13 UDT_GEN_WRITE_BOOL Describes boolean write variable withoutadditional information to write discreteattributes. Corresponds to “write-boolean”in ICD configuration file

UDT14 UDT_GEN_WRITE_DINT Describes integer32 write variable withoutadditional information to write discreteattributes. Corresponds to “write-integer”in ICD configuration file

UDT15 UDT_GEN_WRITE_FLOAT Describes float write variable without addi-tional information to write discrete attrib-utes. Corresponds to “write-float” in ICDconfiguration file

UDT16 UDT_GEN_WRITE_BITSTR Describes bitstring write variable withoutadditional information to write discreteattributes. The bitstring variable is con-verted from type dword. Corresponds to“write-bitstring” in ICD configuration file

Page 53: Station Controller Documentation - Siemens

53

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Name Symbolic Name Description

UDT17 UDT_GEN_WRITE_STRING Describes string write variable withoutadditional information to write discreteattributes. First 2 data bytes describes thestring length. Maximum string length isrestricted to 62 bytes. Corresponds to“write-string” in ICD configuration file

UDT100 UDT_CON Contains connection status information forone IEC 61850 client

Table 12: Station Controller UDTs

Detailed Description: UDT_STATUS_BOOL:

Byte Bit Name2 Description

0 0 Value Bit 0 Value Single Point or Double Point

1 Value Bit 1 Value Double Point

2 HW Value Bit 0 Hardware Status

3 HW Value Bit1

4 subEna Trigger Substitute Enabled Trigger

5 subEna running

6 subEna Value

7 GI ok

1 Quality Code

2 0 subVal Bit 0 Substitution value 1 or 2 bits

1 subVal Bit 1

2 subError If subs had error

3-7 reserved

3 subQ Substitution quality

4-11 Timestamp S7 Time, UTC Time Zone.

Table 13: Detailed Description UDT2, UDT8

Page 54: Station Controller Documentation - Siemens

54

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Detailed Description: UDT_STATUS_DINT, UDT_STATUS_FLOAT:

Byte Bit Name Description

0-3 Value INT32 or Float

4 0 reserved

1 reserved

2 reserved

3 subError If subs had error

4 subEna Trigger Substitute Enabled Trigger

5 subEna running subVal is written

6 subEna Value

7 GI ok

5 Quality Code

6-9 subVal Substitution value INT32 or Float

10 subQ Substitution quality value

11 reserved

12-19

Timestamp S7 Time, UTC Time Zone.

Table 14: Detailed Description UDT3, UDT4

Detailed Description: UDT_CONTROL_BOOL:

Byte Bit Name Description

0 0 Value Bit 0 Single Point or Double Point value

1 Value Bit 1 Double Point value

2 Test

3 Disabled Control allowed/disallowed (1 – disabled)

4 Trigger S7 Trigger to „control“ value

5 Running Control command executing

2 6 Stored error “Error code”- Byte

7 Wrong mode (E.g. not connected)

1 Error code

1 0 LostIndication Lost Frame Indication

1 LostAck Lost Frame Indication Ack

2 Bad Quality Written value has BadQuality

Page 55: Station Controller Documentation - Siemens

55

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Byte Bit Name Description

3 Interop Control with Interop. Flag

4 Synchrocheck Control with Synchrocheck Flag

2-3 OriginID 16 bit integer

4-11 Timestamp S7 Time, UTC Time Zone.

Table 15: Detailed Description UDT5

Detailed Description: UDT_CONTROL_INTEGER, UDT_CONTROL_FLOAT:

Byte Bit Name Description

0 0 reserved

1 reserved

2 Test

3 Disabled Control allowed/disallowed (1 – disabled)

4 Trigger S7 Trigger to „control“ value

5 Running Control command executing

6 Stored error “Error code”- Byte

7 Wrong mode (E.g. not connected)

1 Error code

1 0 LostIndication Lost Frame Indication

1 LostAck Lost Frame Indication Ack

2 Bad Quality Written value has BadQuality

3 Interop Control with Interop Flag

4 Synchrocheck Control with Synchrocheck Flag

2-3 Origin 16 bit integer

4-11 Timestamp S7 Time, UTC Time Zone.

12-15

Value 32 Bits for Integer or Float

Table 16: Detailed Description UDT6, UDT7

Page 56: Station Controller Documentation - Siemens

56

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Detailed Description: UDT_GEN_READ_BOOL, UDT_GEN_READ_DINT,UDT_GEN_READ_FLOAT, UDT_GEN_READ_BITSTR, UDT_GEN_READ_STRING

Byte Name Description

0-X Value The value (Big Endian) is stored here , up to Xbytes.

Table 17: Detailed Description UDT8, UDT9, UDT10, UDT11, UDT12

Page 57: Station Controller Documentation - Siemens

57

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Detailed Description: UDT_GEN_WRITE_BOOL, UDT_GEN_WRITE_DINT,UDT_GEN_WRITE_FLOAT, UDT_GEN_WRITE_BITSTR, UDT_GEN_WRITE_STRING

Byte Bit Name Description

0 0 reserved

1 reserved

2 reserved

3 Enabled

4 Trigger

5 Running

6 Stored error

7 Wrong mode

1 Error code

1 0 LostIndica-tion

Lost Frame Indication

1 LostAck Lost Frame Indication Ack

2 Bad Quality Written value has BadQuality

2-X Value Value (boolean, integer or float)

Table 18: Detailed Description UDT13, UDT14, UDT15, UDT16, UDT17

Detailed Description: UDT_CONN:

Byte Bit Name Description

0 0 Connected link 0 Connection established via localcontroller

1 Connected link 1 Connection established via re-dundant partner or IEC 60870local second master

2 Active link 0 Data Exchange active via localcontroller

3 Active link 1 Data Exchange active via redun-dant partner or IEC 60870 localsecond master

4 Redundant switch overactive

Redundant switch over active

5 Disconnected, timeout Disconnected, timeout

6 Disconnected, timeout lifebit

Disconnected, timeout life bit

Page 58: Station Controller Documentation - Siemens

58

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

Byte Bit Name Description

7 Redundancy trigger Redundancy trigger

1 0 Trigger GI Trigger GI

1 GI is active GI is active

2 GI timeout GI timeout

3 Trigger Test telegram Trigger Test telegram

4 Test telegram running Test telegram running

5 Test telegram result (0 ok,1 Timeout)

Test telegram result (0 ok, 1Timeout)

6 IEC Suggest redundancyswitchover

IEC Suggest redundancy switch-over

7 Redundancy configured Redundancy configured

2-3 Origin for Substitute Origin for substitute values andMonitoring (60870 only Byte 3)

4 Reserved Reserved

5 CommunicationType Communication type

6-9 Partner Address of activelink(IP, DP, etc.)

Partner Address of active link (IP,DP, etc.)

10-11

SubAddress of activelink(IP Port ,etc.)

SubAddress of active link (IP Port,etc.)

12-19

Timestamp last connect(A)

Timestamp last connect (A)

20-27

Timestamp last discon-nect (A)

Timestamp last disconnect (A)

28-35

Timestamp last connect B Timestamp last connect B

36-43

Timestamp last discon-nect B

Timestamp last disconnect B

44-51

Last redundancy switch-over

Last redundancy switchover

Table 19: Detailed Description of UDT100

Detailed Description: UDT_QUALITY:

Quality(UDT)

Bits Name Quality bits in IEC61850

0 0x01 Blocked Operator blocked

1 0x02 Substitute substituted | process

Page 59: Station Controller Documentation - Siemens

59

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

2 0x04 Not actual Old data

3 0x08 Invalid invalid | questionable

4 0x10 Failure failure

5 0x20 Overflow /Inconsistent

overflow / out of range / inconsistent (analog Over-flow or out of range, binary Inconsistent)

6 0x40 Test test

7 0x80 Wire break -

Table 20: Detailed Description UDT1

9.3 Error Codes of EXEC_COM block

0x0000 General success

0x0001 0x7FFF OBJ_HANDLE Returned WinAC ODK object handle

0x8001 E_EXCEPTION An exception occurred.

0x8002 ODK Registration Failure (CREA_COM)

0x8002 E_NO_VALID_INPUT Input: the ANY pointer is invalid. (EXEC_COM)

0x8003 ODK Requested feature not supported by WinAC callback (CREA_COM)

0x8003 E_INPUT_RANGE_INVALID Input: the ANY pointer range is invalid. (EX-EC_COM)

0x8004 A pointer is invalid

0x8005 E_NO_VALID_INPUT Output: the ANY pointer is invalid.

0x8005 E_OUTPUT_RANGE_INVALID Output: the ANY pointer range is invalid.

0x8006 E_OUTPUT_OVERFLOW More bytes were written into the output buffer bythe extension object than were a

0x8007 E_NOT_INITIALIZED ODK system has not been initialized: no previous call toSFB65001 (CREA_COM).

0x8008 E_HANDLE_OUT_OF_RANGE The supplied handle value does not correspond toa valid extension object.

0x8009 E_INPUT_OVERFLOW More bytes were written into the input buffer by the ex-tension object than were allocated.

0x807F ERROR_INTERNAL An internal error occurred.

0x8102 E_CLSID_FAILED The call to CLSIDFromProgID failed.

0x8103 E_COINITIALIZE_FAILED The call to CoInitializeEd failed.

Page 60: Station Controller Documentation - Siemens

60

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

0x8104 E_CREATE_INSTANCE_FAILED The call to CoCreateInstance failed.

0x8105 E_LOAD_LIBRARY_FAILED The library failed to load.

0x8106 E_NT_RESPONSE_TIMEOUT A Windows response timeout occurred.

0x8107 E_INVALID_OB_STATE Controller is in an invalid state for scheduling an OB.

0x8107 OB cannot be scheduled as the WinAC RTX is not in RUN state

0x8108 E_INVALID_OB_SCHEDULE Schedule information for OB is invalid.

0x8108 OB number is invalid or internal failure

0x8109 E_INVALID_INSTANCEID Instance ID for SFB65001 call is invalid.

0x810A E_START_ODKPROXY_FAILED Controller could not load proxy DLL.

0x810B E_CREATE_SHAREMEM_FAILED The WinAC controller could not create or initial-ize shared memory area.

0x810C E_OPTION_NOT_AVAILABLE Attempt to access unavailable option occurred.

0x8201 The Execute command index could not be found

0x8250 There are no more available positions in the job list. Some jobs must be deletedbefore any more are added.

0x8252 The count is invalid

0x8253 A dataType of an item in the list is invalid.

0x8254 The count specified is invalid

0x8255 A memoryArea of an item in the list is invalid.

0x8256 A DB Number of an item in the list is invalid.

0x8257 A bitNumber of an item in the list is invalid.

0x8258 A pBuff of an item in the list is invalid.

0x8259 A data quantity is invalid.

0x825A The areaOffset parameter is invalid for this type.

0x825B The frequency value is invalid.

0x825C The callback pointer is invalid.

0x825D The jobID pointer is invalid.

0x825E The jobID is invalid.

0x825F Job could not be completed because address is incorrect.

0x8260 Job could not be completed because of protection level.

0x8261 Job could not be completed because of hardware issues

0x8301 Invalid Thread Execution Priority

0x8401 Invalid Asynchronous Event

0x8402 Asynchronous Processor Queue is empty

0x8403 Asynchronous Processor Queue is full

Page 61: Station Controller Documentation - Siemens

61

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

0x8500 Beginning of User define return codes

0x8501 No connection with IEC services

0x8502 Data DB is unknown

0x8503 DB length is invalid

0x8504 Invalid read of response

0x8505 Cannot lock shared memory for write

0x8506 Cannot lock shared memory for read results

0x8507 Cannot read pipe

0x8508 TIMEOUT for response

0x8509 DataEx called to often in standby mode

0x8520 Redundancy partner is not connected

0x8521 Redundancy partner just lost connection

0x8522 Error by sending of instance DB to red partner

0x8523 No frame from master in given time

0x8524 Invalid instanse DB length

0x8525 Reciving of DB increased total time

0x8526 Redundancy status unknown

0x8FFF General failure

9.4 IEC61850 Control Error Codes

If there is an error writing a command to an IEC 61850 server, the following table de-scribes the error code displayed on the Control block in CFC:

0 IEC61850_CLIENT_SUCCESS = 0,

1 IEC61850_DATA_CLIENT_ERR_NULL_SERVER

2 IEC61850_DATA_CLIENT_ERR_NOT_CONNECTED

3 IEC61850_DATA_CLIENT_ERR_NO_CONNECTION

4 IEC61850_DATA_CLIENT_ERR_FLOW_CONTROLLED

5 IEC61850_DATA_CLIENT_ERR_MAX_SERVICES_EXCEEDED

6 IEC61850_DATA_CLIENT_ERR_NO_READ_DATA

7 IEC61850_DATA_CLIENT_ERR_MEMORY

8 IEC61850_DATA_CLIENT_ERR_ENCODING

9 IEC61850_DATA_CLIENT_ERR_BAD_TRANSACTION

Page 62: Station Controller Documentation - Siemens

62

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

10 IEC61850_DATA_CLIENT_ERR_NO_TRANSACTIONS

11 IEC61850_DATA_CLIENT_ERR_CONNECTION_CLOSED

12 IEC61850_DATA_CLIENT_ERR_TIMED_OUT

13 IEC61850_DATA_CLIENT_ERR_CONNECTION_STATE

14 IEC61850_DATA_ERR_APPLICATION

15 IEC61850_DATA_ERR_PARAMETERS

16 IEC61850_DATA_ERR_CONFIRMED_ERROR

17 IEC61850_DATA_ERR_REJECT

100 IEC61850_DATA_OBJECT_INVALIDATED

101 IEC61850_DATA_HARDWARE_FAULT

102 IEC61850_DATA_TEMPORARILY_UNAVAILABLE

103 IEC61850_DATA_OBJECT_ACCESS_DENIED

104 IEC61850_DATA_OBJECT_UNDEFINED

105 IEC61850_DATA_INVALID_ADDRESS

106 IEC61850_DATA_TYPE_UNSUPPORTED

107 IEC61850_DATA_TYPE_INCONSISTENT

108 IEC61850_DATA_OBJECT_ATTRIBUTE_INCONSISTENT

109 IEC61850_DATA_OBJECT_ACCESS_UNSUPPORTED

110 IEC61850_DATA_OBJECT_NON_EXISTENT

111 IEC61850_DATA_OBJECT_VALUE_INVALID

254 IEC61850_DATA_CONVERT_ERROR

Page 63: Station Controller Documentation - Siemens

63

A documentation paper issued by: Siemens. © Siemens AG 2011-2013. All rights reserved.

Documentation | Station Controller

www.siemens.com

[email protected]

Tel: +49 (0) 721/595 - 6380

All rights reserved. All trademarks usedare owned by Siemens or their respectiveowners.

© Siemens AG 2011-2015

Siemens AG

Digital Factory DivisionCustomer Services DF&PD76187 KarlsruheGERMANY