Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Overview

The IEC 61400-25 Server realizes a communication between a wind turbine and one or several control stations. This TwinCAT Supplement product consists of two basic components. For the configuration of the data model you have the so called "TwinCAT Telecontrol Configurator". This configurator generates PLC Code which can be integrated into a TwinCAT PLC Project. Here the second component, the TcIEC61850Server.lib comes into operation. This PLC library integrates the MMS (Manufacturing Message Specification) based communication stack and realises the communication according to IEC 61400-25. The IEC 61850 is the base standard and the IEC 61400-25 is a specialisation for wind turbine communication.

This documentation is devided into these two components:

- TwinCAT Telecontrol Configurator

- PLC Library as communication stack

System requirements

  • Programming environment:
    • XP, XPe;
    • TwinCAT Installation Level: TwinCAT PLC or higher;
    • TwinCAT System Version 2.10.0 Build >= 1340 or higher;
    • .NET Framework 3.5 for the TwinCAT Telecontrol Configurator
  • Target system:
    • PC or CX (x86): XP, XPe, CE 6 (Image v3.06e or higher);
    • CX (ARM): CE 5 (Image v2.20e or higher);
    • TwinCAT PLC runtime system Version 2.10.0 or higher;

Product components

  • TwinCAT Telecontrol Configurator for the configuration of the standardized data model. Logical Devices, Logical Nodes, Data Object and Data Attributes can be configurated.
  • TcIEC61850Server.Lib (PLC library with the server block, this library needs to be integrated into the PLC project, all of the other libraries will automatically be added to the PLC-project);
  • TcACSI.Lib (Basic ACSI-Data types for the device modelling according to IEC 61850-7-2);
  • TcIEC61850_8_1.Lib (SCSM: Mapping on MMS-services accoding to IEC 61850-8-1);
  • TcMMS.Lib (MMS-Basic functions, function blocks, data types);
  • TcULOSI.Lib (Implementation of the Session-, Presentation- and ACSE-layer);
  • TcBER.Lib (BER-Decoding/Encoding);
  • TcRFC1006.Lib (Implementation of the transport layer);
  • TcTPKT.Lib (Transport-Packetizer);
  • TcCollections.Lib (Collection-Classes);
  • TcSocketHelper.Lib (TCP/IP auxiliary functions);
  • TcpIp.Lib (TCP/IP basic functions);
  • TwinCAT TCP/IP Connection Server;

Installation

Demo version

If you did not get a valid product key you have the possibility to use a limited demo version of the IEC 61850/61400-25 Server. Therefore you have to insert Demo as a product key. Now there are maximum three logical Nodes available and after an hour the connection to the Client will cut off. But this hour is enough for a basic communication test. After this hour you can do a restart of the server.

Windows XP, XPe

The PLC libraries will be copied into the ..\TwinCAT\Plc\Lib-folder during the installation. The TwinCAT TCP/IP Connection Server is going to be listed in the TwinCAT Server list. At the TwinCAT Start the TCP/IP Connection Server starts automatically and at a TwinCAT Stop the Server stops.

Windows CE

The product version for the runtime system under Windows CE is available as a separate product. Follow the following steps if you have a product version for Windows CE:

  • Install the product on your programming-pc as usual. The PLC libraries will be copied in the ..\TwinCAT\Plc\Lib-folder during the installation.
  • X86 CPU (CX1000, CX1020, IPC, ... ):
    • After the installation you will find a Cabinet-file for the CE-runtime system in this folder: ...\TwinCAT\CE\TwinCAT PLC IEC 61850 Server CE\
    • Copy the data file: TcPlcIec61850Svr_CE.I586.CAB in a folder on the CE-runtime system.
  • ARM CPU (CX9000, CX9010, ... ), TwinCAT PLC Library: IEC 60870-5-104 Understation (slave) v2.0.4 and higher:
    • After the installation you will find a Cabinet-file for the CE-runtime system in this folder: ...\TwinCAT\CE\TwinCAT PLC IEC 61850 Server CE\
    • Copy the data file: TcPlcIec61850Svr_CE.ARMV4I.CAB in a folder on the CE-runtime system.
  • On the CE-System: Install the CE-components (by double-click on the Cabinet-file).
  • Reboot the CE device. The TCP/IP Connection Server is going to be started automatically with the CE-operating system.

General advise for the installation

During the installation you will be asked if you want to work "case sensitive" or not. When you choose this option this applies for all TwinCAT projects that are on the installation device. If you do not use this option the intended differentiation of case sensitive from IEC 61850 or IEC 61400-25 will be ignored and everything will be communicated in capital letters.

Introduction/Tutorial

For the TwinCAT IEC 61850 Server there is a detailed step-by-step instruction available. A programming code for a fast communication test you will find under examples in the attachment of this documentation.

Further documentation

  • Standard IEC 61850-7-1:2003
  • Standard IEC 61850-7-2:2003
  • Standard IEC 61850-7-3:2003
  • Standard IEC 61850-7-4:2003
  • Standard IEC 61850-8-1:2004
  • Standard IEC 61400-25:2003
  • Standard ISO/FDIS 9506-1
  • Standard ISO/FDIS 9506-2
  • TwinCAT TCP/IP Connection Server


IEC61850 Standard Overview

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

Norm Overview

The IEC 61850 is a general transmission protocol for protective and control equipment in medium and high voltage electrical substations. Physically this communication is based on the Ethernet Technology. At present the Server-Client-communication over MMS (Manufacturing Message Specification) and TCP/IP (Transmission Control Protocol/ Internet Protocol) is supported. The communication stack for the Server which is developed by Beckhoff (see graphic below) is integrated step-by-step into the TwinCAT PLC in form of libraries. In the following graphic you can also see the IEC 61400-25 which has been defined especially for the Wind turbines and therefore is a specialization of the IEC 61850.

The most important libraries which are responsible for the mapping of the IEC 61850 will be described here:

Library | Description
TcACSI.Lib | This library is responsible for a clean interface to the subordinate layers. The therefore realised "Abstract Communication Service Interface" contains all basic-data types of the above named standards and the corresponding blocks to browse through the hierarchical structures of the IEC 61850 or IEC 61400-25. This ACSI-interface allows a universal and future-proofed connection of the norm to the subordinated protocols.
TcMMS.Lib | In the TcMMS.Lib the necessary services for the communication have been implemented.
TcASN1.Lib | In this library the user has all of the coding- and decoding function blocks for the in BER (Basic Encoding Rules for ASN.1) coded telegrams.

To realise the TCP/IP communication the TwinCAT TCP/IP Connection Server is used underneath the known libraries. This Supplement product is responsible for the realisation of one or more TCP/IP-Server/-Clients in the TwinCAT PLC.

The in 2004 released IEC 61850 is strictly object-oriented and its data model is build up hierarchically. There are 5 hierarchical levels which have been implemented into the TwinCAT PLC through the corresponding libraries of the standards. Explanations and examples how to apply such a structure are defined under Protocol Overview.

Example of use

In this case the IEC 61400-25 allows that wind turbines from different manufacturers can communicate with a central control station. Because of the standardization the expectations are that manufacturer-specific protocols will be avoided. The company Beckhoff supports this way by the implementation of IEC 61850 and IEC 61400-25 into the TwinCAT Automationsuite.


IEC61850 Gen Data Model

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

Data model

The IEC 61850 is the basic norm for different application-specializations (et.al. for the IEC 61400-25). Thats why all data- and object models for the standards that are based on this norm are equal. This data model is structured into five hierarchy levels. Thereby the corresponding standards provide the necessary Logical Nodes, Data Objects and Data Attributes. The user only needs to make sure that his Server is connected to the communication system and apply his own Logical Devices.

Server | The first hierarchy level in the data model of the IEC 61850 or the IEC 61400-25 forms the server. The server offers a connection point for a device, whereby communication systems that are based on Ethernet can be linked. In this case TwinCAT would display such a server with the libraries that are included to the protocol on an Industrial PC or Embedded PC.
Logical Device | The Logical Devices form the second hierarchy level in the data model of the IEC 61850 and IEC 61400-25. This level separates a single physical device into several separate components, the so called Logical Devices. The advantage of this separation is that functions or objects that belong together will stand together because of their similarities. And they also can be switched into another operating mode. According to the device different Logical Nodes can be implemented out of the third hierarchy level.
Logical Node | The Logical Nodes form the third hierarchy level in the data model of the IEC 61850 or the IEC 61400-25. They represent the information of all of the sub-functions that can occur in the digital station control technology and in wind energy plants. These are all of the protective functions but also automation functions and functions to process measurement- and meter data. For all of the normed Logical Nodes of the IEC 61850 and IEC 61400-25 there are defined identifiers that always consist of a shortcut with four letters. For example the shortcut XSWI stands for Circuit Switch. A Logical Device can consist out of several of this nodes.
Data Object | A Logical Node can consist of several Data Objects that form the fourth hierarchy level of the IEC 61850 and IEC 61400-25 data model. Characteristic of this hierarchy level is, that data objects can be interlaced hierarchically. A data object can consist of several sub data objects before it will access on a basic- or complex data type in a Common Data Class (CDC).
Data Attribute | The lowest hierarchy level of the IEC 61850 and IEC 61400-25 are forming the data attributes. They display the detailed information or values of the data objects. Because the same scale of data attributes is defined for several data obejcts, the attributes of an object are combined into the so called Common Data Classes (CDC). Thereby the corresponding CDC is named for every data object. You can also say that the data objects are specializations of the CDC.


Configurator Overview

The TwinCAT Telecontrol Configurator enables a perfect separation between the configuration of the standardized data model and the programming in the PLC. The PLC code which is generated after the configuration can easily be integrated and used as an export-file into the PLC Control.

By pressing the New Project button in the toolbar of the configurator a Wizard-Window opens as it is shown in the next picture. This wizard helps to create a first start configuration. You can enter a Logical Device name and to select the Logical Nodes out of the different standards. The mandatory nodes LLN0 and LPHD do not have to be selected especially because they will entered automatically. Another advantage is that you can enter the amount of instances for a Logical Node. This will reduce the time of configuration.

Next to the standard functions Open and Save the TwinCAT Telecontrol Configurator offers the possibility to define own, private Logical Nodes and Common Data Classes. Therefore the user needs to use the given data types of the IEC61850 to maintain conformance. To see how the creation of custom specific extensions will work, read here: Private Logical Nodes and Private Common Data Classes.

The most important functionality of this configurator is, that you can build a PLC export data file out of the created configuration. Thereby only the data types and objects that are really needed in the configuration will be exported. Ressources will be saved, which makes this Supplement product much more scalable. Details of the content of the Export data file and how to include these into a TwinCAT PLC project will be explained here.

You can find all of the toolbar functionalities also in the menu bar of the configurator. Under File you can also find the function Save As... .Furthermore the surface of the configurator is divided into five important parts.

Server Configuration Data Object Configuration Object properties

Server Configuration:

The Server overview contains all of the configurated Logical Devices and also offers the Logical Nodes: Server Configuration
Data Object Configuration:

This overview contains all data attributes of the data object which have been selected in the server configuration: Data Object Configuration
Object properties:

In this window you can see the corresponding properties of the selected objects: Object properties
Reporting:

In this window all of the generated reporting blocks will be listed: Reporting
DataSets:

In this windows all of the generated DataSets will be listed: DataSets


IEC61850 Configurator Server Overview

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

Server Configuration

In the server overview of the TwinCAT Telecontrol Configurator you can see all of the configurated Logical Devices and the corresponding Logical Nodes. In this window you have the possibility to add Logical Nodes to the existing configuration and to activate the optional Data Objects of a node.

If you open a new configuration the mandatory Logical Nodes LLN0 and LPHD will automatically be applied. You can identify that these are mandatory because of the red marks in the checkboxes of the nodes.
This differentiating factor applies to all objects in the configurator. If optional objects will be activated they will get a blue mark. You also have the possibility to change the name of the Logical Device by click on the name.

With a right-click on the respective Logical Device the context menu opens. There you have the option Add Logical Node. In another window the user has the possibility to choose a Logical Node out of different databases. There is always a private and a IEC 61850 database. Depending on what product licence you have got, other databases will be activated. In this example the database of the Wind Turbine standard IEC 61400-25 is also available.

The configuration of the individual data objects will be carried on the right side of the configurator in the Data Object Configuration


IEC61850 Data Object Overview

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

Data Object Configuration

In the data object overview on the right side of the Telecontrol Configurator the data attributes of the different data objects can be configurated.

As in the server configuration you can activate the optional data attributes by the corresponding checkboxes here. Furthermore it is possible to get in the Set default Value dialog by double-click or with the help of the context-menu of the data attribute.

In the Set default Value dialog it is possible to set initial values for the data attributes. Therefore the user gets an offer of all choices for the corresponding attribute, except of numerical values. Later, this values will be exported in the PLC code.

If you select an attribute as it is shown in the first picture you will see the information for the adjusted initial value in the overview of the object settings.

Under the tab "DataSets" it is possible to assign the selected attribute to a DataSet. If the attributes contains sub-elements these will be shown in a tree as you can see in the following pictures.

Under the tab "Scope View Items" you can select all of the elements of the selected attributes for a Scope View configuration.


IEC61850 Property Overview

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

Object properties

In the object properties you will find useful information for the selected object.

Logical Node:

Name: Name of the Logical Node, as it is shown in the data model tree.

Description: Offers a short description what the short cut means.

Group: Names the superior group where the Logical Node (IEC 61850-7-4) is part of.

Data Object:

Name: Name of the Data Objects, as it is shown in the data model tree.

Description: Offers a short description, what task this data object has.

CDC: Names the Common Data Class (IEC 61850-7-3) where the selected data object belongs to.

Presence: Says if the selected data object is a mandatory or an optional object.

Data Attribute:

Name: Name of the Data Attribute, as it is shown in the data model tree.

IEC Type: Names the data type of the attribute, how it is defined in the IEC 61850.

PLC Type: Names the data type of the attribute, how it is mapped in the PLC.

Trigger Option: Names the trigger option for the respective attribute. This is important for the Data Sets and for the Reporting.

Presence: Says if the selected attribute is a mandatory or optional attribute.

Default Value: Shows the set default value, as set in the PLC when there is an export.

Functional Constrain:

Name: Standardized shortcut of the selected Functional Constrains.

Description: Meaning of the shortened Functional Constrains.

Bit Mask: Bit Mask which will be set in the PLC Export-data file.

DataSet: Lists the DataSets in which the Function Constrain is included.


Private Logical Nodes

With the function New Logical Node it is possible to define your own Logical Nodes or to extend existing Nodes. Thereby the new elements will be written into a private database. This elements then will be available for every new configuration.

In the shown window you can define your own Logical Nodes. Therefore you can select a Common Data Class for each Data Object. Furthermore you can assign the object to a group. This will lead to a clearly represented categorization in the configurator. In the column Presence you can set if the element should be activated per default or should be optional.

In this graphic the in the standard defined Logical Node XSWI (Circuit Switch) is extended user-specifically. Therefore you can select a Template for a Logical Node at the upper right side of the window. In order to avoid a conflict the name of the Logical Node needs to be another than the name of the template.

By confirmation with the Add Button the new Logical Node will be written into the private database and is available for the configuration.


Private Common Data Classes

With the function New Common Data Class it is possible to define own Common Data Classes or to extend existing CDCs. Thereby the new elements will be written into a private database. This elements then will be available for every new configuration.

If you apply a new Common Data Class it is possible to include further Sub Data Objects in addition to the attributes. Therefore you have the possibility to select a CDC at the bottom of the window. For the attributes you can select the data types of the IEC 61850. This could be an integer for example. To describe the exact size of the integer there is a selection for the respective data type under ACSI Data Types. The Functional Constraints and the Trigger Option can be set as well. In the column Presence you can set if the element should be activated per default or should be optional.

In this graphic the in the standard defined CDC INC (Controllable Integer) is extended user-specifically. Therefore you can select a Template for a CDC at the upper right side of the window. In order to avoid a conflict the name of the CDC needs to be another than the name of the template.

By confirmation with the Add Button the new Common Data Class will be written into the private database and is available for the configuration.


PLC Export data file

After the compilation of the configuration for the IEC 61850 Server the Create PLC Export File in the toolbar can be activated to generate the export data file. The later on import into the TwinCAT PLC Control makes the data model of IEC 61850 / IEC 61400-25 useable in the PLC.

In the Save as... dialog the memory location can be selected. You can read the export data file in the TwinCAT PLC Control with the Import function. Therefore you have to select Project and then Import in the menu bar... as it is shown in the next picture.

Because of the import two folders will be created in the Data Types tab. On the one hand [internal] and on the other hand a folder which has the name of the Logical Device that we created in the configurator. As you can see in the next picture the folder has the name WindTurbine. This folder contains the actual configuration with every Logical Nodes and the subordinated hierarchical levels. In the folder [internal] you will find some structured data types which will be used in the configuration. Normally this folder is of little importance for the user.

In the folder WindTurbine you can see the structure ST_LD_WindTurbine. This structure must be instantiated in the PLC project and needs to be commited to the function block FB_IEC6850Server. You will find detailed information about this point in the examples of this documentation.

If you open each folder of the Logical Nodes you can see the containing Data Objects in another structure. The variables info and end are for the internal communication. These are only relevant for the user if he wants to do a manual copy of the created structures. They need to exist in every structure. The folder Common Data Classes contains the attributes of the different objects.

Exemplary you can see here the attributes for the Data Object Spd (Wind Turbine Generator Speed). Because of the comments the controller gets information as for example about Functional Constrain or Trigger Option. But also the Default Values which has been set in the configurator will be visible. So it is possible to detect that Meters per second is set for the attributeunits.

Global variables will be generated when you import the Export data file . The object "TcTelecontrol_GLOBAL_VAR" will be generated and contains an instance of the FB_IEC61850Server - on instance per Logical Device and one instance of the generated DataSets.


PLC Library Overview

The most important PLC function blocks, functions, data types and constants of the TwinCAT IEC 61850 Server are discribed in this part of the documentation. For using this elements you have to insert the TcIEC61850Server.lib in your TwinCAT PLC Control project.

Development Environment | Target | PLC Library
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcIEC61850Server.Lib


FUNCTION_BLOCK FB_IEC61850Server

With this function block you can realise a Server according to the IEC 61850 standard in the TwinCAT PLC. The connection parameters like IP-address and the application-specific parameters will be set over the input variables appPara and srvPara.

The Server block offers two actions:

  • A_INIT; At the call of this action the server changes into the INITIALIZING condition. At this phase the internal database will be initialized (the instances of the joint data classes, attributes, logical nodes etc. will be generated). After the initialization of the internal database the Server is in the PREOP condition. At this condition furthermore application-dependent data classes can be generated in the database e.g. Datasets.
  • A_OPERATE; The Server changes to the OPERATIONAL condition by calling this action. At this condition the Server can connect to the Client and exchange data actively.

VAR_INPUT

VAR_INPUT
        appPara         : ST_MMS_ApplicationPara;    (* Application parameter *)
        srvPara         : ST_MMS_ProtocolPara;  (* Communication parameter *)
        pLD     : DWORD := 0;             (* Pointer to logical device node *)
        cbLD    : UDINT := 0;             (* Byte size of logical device node *)
END_VAR

appPara: Application-specific configuration parameters (MMS and IEC 61850 parameter).

srvPara: Parameters that basically affect the configuration of the communication stack beneath MMS.

pLD: Pointer (address) on the instance of the structure with the model description of the logical device (LD). The address can be determined with the ADR operator.

cbLD: Size of the byte of the structure with the model description of the logical device (LD). The size of the byte can be determined with the SIZEOF operator.

VAR_OUTPUT

VAR_OUTPUT
        system : ST_IED_System;
        eState : E_IED_STATE;
END_VAR

system: System variable.

eState : Device status.

Example:

You can find further examples including every sources under: Examples.

PROGRAM MAIN
VAR
        bInit   : BOOL := TRUE;
        bOperate        : BOOL := TRUE;
        bServer         : FB_IEC61850Server := (        srvPara := (    sHost := '127.0.0.1',(* change the IP-Address to meet your needs *)
                                                        debug := ( bError := TRUE, bLog := TRUE ) ) );(* Server instance *)

        fbChange : FB_ACSI_ChangePresence;(* This function block changes the mandatory/optional presence parameter *)
 Relay   : ST_LD_Relay;(* Our logical device *)
END_VAR

IF bInit THEN
        bInit := FALSE;
        fbServer.appPara.bAccessCtrl := FALSE; (* TRUE = Use access control/authentication, FALSE = Don't use access control/authentication *)
 (* first user *)
        fbServer.appPara.accessCtrl[1].bAuthentication := TRUE;(* TRUE = access control/authentication for this user enabled, FALSE = Disabled *)
 fbServer.appPara.accessCtrl[1].authentMechanism := '2.2.3.1';
        fbServer.appPara.accessCtrl[1].authentPassword := 'PASSWORD';
        (* second user *)
        fbServer.appPara.accessCtrl[2].bAuthentication := TRUE;
        fbServer.appPara.accessCtrl[2].authentMechanism := '2.2.3.1';
        fbServer.appPara.accessCtrl[2].authentPassword := 'OTHER';

  (* at this point you can change the presence of some attributes... *)

        (* change presence of some attributes *)
(*      fbChange( pDO := ADR( Relay.LLN0.Loc.subEna ), cbDO := SIZEOF(  Relay.LLN0.Loc.subEna ), bPresence := TRUE );*)(* change to mandatory *)
(*      fbChange( pDO := ADR( Relay.LLN0.Loc.t ), cbDO := SIZEOF(  Relay.LLN0.Loc.t ), bPresence := FALSE );*)(* change to optional *)

        fbServer.A_INIT( pLD := ADR( Relay ), cbLD := SIZEOF( Relay ) );
END_IF

IF bOperate THEN(* switch to oparating state *)
        IF fbServer.eState = eIED_STATE_PREOP THEN
                bOperate := FALSE;

                (* at this point you can configure your data sets...*)

                fbServer.A_OPERATE( pLD := ADR( Relay ), cbLD := SIZEOF( Relay ) );
        END_IF
END_IF

fbServer( pLD   := ADR( Relay ), cbLD := SIZEOF( Relay ) );

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (X86, ARM) | TcIEC61850Server.Lib


FUNCTION F_GetVersionTcIEC61850Server

With this function it is possible to read information of the version from the PLC library.

FUNCTION F_GetVersionTcIEC61850Server: UINT

VAR_INPUT
        nVersionElement : INT;
END_VAR

nVersionElement : Version element, that should be read. Possible parameters:

  • 1 : major number;
  • 2 : minor number;
  • 3 : revision number;
Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcIEC61850Server.Lib


FUNCTION F_GetVersionTcACSI

With this function versioninformation of the PLC-library can be readout.

FUNCTION F_GetVersionTcACSI : UINT

VAR_INPUT
        nVersionElement : INT;
END_VAR

nVersionElement : Version element, that should be readout. Possible parameter:

  • 1 : major number;
  • 2 : minor number;
  • 3 : revision number;
Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcACSI.Lib


FUNCTION F_GetVersionTcMMS

With this function versioninformation of the PLC-library can be readout.

FUNCTION F_GetVersionTcMMS : UINT

VAR_INPUT
        nVersionElement : INT;
END_VAR

nVersionElement : Versionelement, that should be readout. Possible Parameters:

  • 1 : major number;
  • 2 : minor number;
  • 3 : revision number;
Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE_E_IED_STATE

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

TYPE E_IED_STATE

Operating mode of the server.

TYPE E_IED_STATE :
(
        eIED_STATE_IDLE := 0,
        eIED_STATE_INITIALIZING,
        eIED_STATE_PREOP,
        eIED_STATE_OPERATIONAL,
        eIED_STATE_STOPPING
);
END_TYPE

The server is in the IDLE state after the server-code has been downloaded onto the target device and none of the server-actions (A_INIT oder A_OPERATE) have been called.
At the call of the action A_INIT the server changes into the INITIALIZING state. In this phase the internal database will be initialized (the instances of the common data classes, attributes, logical nodes, ... will be generated). After that the server changes into the PREOP state. In this state more application-dependent data classes can be generated in the database, for example data sets. When all of the data sets have been configurated the OPERATIONAL state can be changed by calling the action A_OPERATE. In this state the server can build a connection to the client and can change data actively.

Development environment | Target system | PLC libraries to be included
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcIEC61850Server.Lib


TYPE_ST_IED_System

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

TYPE ST_IED_System

TYPE ST_IED_System :
STRUCT
        vmd : ST_MMS_VMD;
END_STRUCT
END_TYPE

vmd: This structure represents the VMD-Object (Virtual Manufacturing Device).

Development environment | Target system | PLC libraries to be included
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcIEC61850Server.Lib


TYPE E_MMS_Environment

TYPE E_MMS_Environment:
(
        eMMS_Environment_None := 0,
        eMMS_Environment_Establishing,
        eMMS_Environment_Running,
        eMMS_Environment_Relinquishing
);
END_TYPE

This variable delivers the status of the MMS-environment.

eMMS_Environment_None: MMS-environment is in inactive status.

eMMS_Environment_Establishing: MMS-environment is set up right now.

eMMS_Environment_Running: MMS-environment is active (MMS-services can be executed)

eMMS_Environment_Relinquishing: MMS-environment will be break down.

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_ApplicationPara

TYPE ST_MMS_ApplicationPara :
STRUCT
  (* Default mms settings *)
 maxPDUsize              : UDINT := 65000;
        localDetail             : DINT  := 65000;
        maxServOutCalling               : INT := 10;
        maxServOutCalled                : INT := 10;

        services                        : ST_MMS_ServiceSupportOptions;(* Default supported services *)
 parameters              : ST_MMS_ParameterSupportOptions;(* Default parameter support CBB *)
 nestingLevel            : SINT := 5;(* Default nesting level *)
  (* authentication / access control *)
 bAccessCtrl             : BOOL := FALSE;(* Access control: TRUE = enabled, FALSE = disabled *)
 accessCtrl              : ARRAY[1..MAX_MMS_ACCESS_CONTROL_USERS] OF ST_MMS_AccessControl;

END_STRUCT
END_TYPE

maxPDUsize: max. Byte length of the PDU (protocol data unit)

localDetail: Local detail called.

maxServOutCalling: max. authorised amount of unconfirmed MMS-services at the calling system.

maxServOutCalled: max. authorised amount unconfirmed MMS-services at the called system.

services: Supported MMS-services.

parameters: Supported CBB-parameters.

nestingLevel: max. interlacing depth of the MMS-object data.

bAccessCtrl: Activates/deactivates the authentication over a password. If this variable is set at the connection establsihment the configuration settings in the array variable "accessCtrl" are getting proofed.

accessCtrl: User-access and -configuration settings. Every array element equates a user, so it is possible to configurate MAX_MMS_ACCESS_CONTROL_USERS

Ddevelopment environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_ProtocolPara

MMS communication parameters.

TYPE ST_MMS_ProtocolPara:
STRUCT
        sSrvNetID       : T_AmsNetID := ''; (* TwinCAT TCP/IP Connection Server network address (default = empty string) *)
 bClient         : BOOL := FALSE;(* TRUE => act as client, FALSE => act as server (reserved for future use) *)
 sHost           : T_IPv4Addr := '127.0.0.1'; (* If client => remote address, if server => local address. String containing an (Ipv4) internet protocol dotted address. *)
 nPort           : UDINT := 102; (* If client => remote internet protocol (IP) port, if server => local listener port (default 102) *)
 nMode           : DWORD := 16#80000001;(* Additional (optional) parameters e.g. bit 31 = CONNECT_MODE_ENABLEDBG, bit 0 = LISTEN_MODE_CLOSEALL *)
 eAccept         : E_SocketAcceptMode := eACCEPT_ALL; (* Connection accept flags (server only) *)
        local_AP_title          : STRING := '1.1.1.999.1';
        local_AE_qualifier      : UDINT := 12;
        local_T_selector        : STRING := '00 01';(* local-transport-selector *)
        local_S_selector        : STRING := '00 01';(* local-session-selector *)
        local_P_selector        : STRING := '00 00 00 01';(* local-presentation-selector *)

        remote_AP_title         : STRING := '1.1.1.999';
        remote_AE_qualifier     : UDINT := 12;
        remote_T_selector       : STRING := '00 01';(* remote-transport-selector *)
        remote_S_selector       : STRING := '00 01';(* remote-session-selector *)
 remote_P_selector       : STRING := '00 00 00 01';(* remote-presentation-selector *)

        eTPDUsize       : E_COTP_DUsize := eCOTP_DUsize_1024;

        debug           : ST_MMS_DebugPara;
END_STRUCT
END_TYPE

sSrvNetID: The network address of TwinCAT TCP/IP Connection Server (default = empty string);

bClient: Reserved and not used. If set then the device acts as client. If not set than as server (default = FALSE);

sHost: Local IPv4 server host address as string (default = '127.0.0.1' = loopback address);

nPort: Local server port address (default = 102);

nMode: Additional (optional) parameters (default = CONNECT_MODE_ENABLEDBG OR LISTEN_MODE_CLOSEALL):

  • Bit 31: Enables/disables socket creation/release debug messages (use the constant CONNECT_MODE_ENABLEDBG to mask/set this bit);
  • Bit 0: Enables/disables the automatic close of old connections/sockets on PLC start (user the constant LISTEN_MODE_CLOSEALL to mask/set this bit);
  • All other bits are reserved;

eAccept: Reserved and not used. Server only: connection accept flags (default = eACCEPT_ALL = accept all incomming connections);

local_AP_title: ACSE AP-Title of this device as string (default = '1,1,1,999.1' );

local_AE_qualifier: ACSE AE-Qualifier of this device (default = 12);

local_T_selector: Local TSAP-Address as string (TSAP = Transport Service Access Point, default = '00 01');

local_S_selector: Local SSAP-Address as string (SSAP = Session Service Access Point, default = '00 01');

local_P_selector: Local PSAP-Address as string (PSAP = Presentation Service Access Point, default = '00 00 00 01');

remote_AP_title: ACSE AP-Title of remote device as string (default = '1,1,1,999');

remote_AE_qualifier: ACSE AE-Qualifier of remote device (default = 12);

remote_T_selector: Remote TSAP-Address as string (TSAP = Transport Service Access Point, default = '00 01');

remote_S_selector: Remote SSAP-Address as string (SSAP = Session Service Access Point, default = '00 01');

remote_P_selector: Remote PSAP-Address as string (PSAP = Presentation Service Access Point, default = '00 00 00 01');

eTPDUSize: Max. byte length of the transport layer data segment ( default = eCOTP_DUsize_1024 = 1024 byte );

debug: This structure configures the behaviour of debug messages. The member variables are enabling/disabling logging of debug messages to the TwinCAT System Manager Logview.

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_AccessControl

TYPE ST_MMS_AccessControl :
STRUCT
  (* authentication *)
 bAuthentication         : BOOL := TRUE;(* Authentication: TRUE = enabled, FALSE = disabled *)
        authentMechanism        : STRING := '2.2.3.1';(* Authentication mechanism: (joint-iso-ccitt.2.3.1) = 52 03 01 hex *)
        authentPassword         : STRING(MAX_MMS_PASSWORD_LENGTH) := 'PASSWORD';(* Authentication password *)

        services                : ST_MMS_ServiceSupportOptions;(* Supported services *)
        parameters      : ST_MMS_ParameterSupportOptions;(* Parameter support CBB *)
        nestingLevel    : SINT := 5;(* Nesting level *)

END_STRUCT
END_TYPE

bAuthentication: The authentication-settings are activated for this user if the parameter is set on TRUE. Over this parameter you can temporary deactivate the acess for some users.

authentMechanism: Authentication-Mechanism (default = "2.2.3.1").

authentPassword: Authentication-Password (default = "PASSWORD").

services: Supported MMS-Services.

parameters: Supported CBB-Parameter.

nestingLevel: Max. permitted interlacing-depth of the MMS-Variables (default = 5).

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_ServiceSupportOptions

      TYPE ST_MMS_ServiceSupportOptions:
STRUCT
        status                          : BOOL := TRUE;
        getNameList                     : BOOL := TRUE;
        identify                                : BOOL := TRUE;
        read                            : BOOL := TRUE;
        write                           : BOOL := TRUE;
        getVariableAccessAttributes     : BOOL := TRUE;
        defineNamedVariableList                 : BOOL := TRUE;
        getNamedVariableListAttributes  : BOOL := TRUE;
        deleteNamedVariableList                 : BOOL := TRUE;
        getDomainAttributes             : BOOL := TRUE;
        kill                            : BOOL := FALSE;
        readJournal                     : BOOL := TRUE;
        writeJournal                    : BOOL := TRUE;
        initializeJournal                       : BOOL := TRUE;
        reportJournalStatus             : BOOL := TRUE;
        getCapabilityList                       : BOOL := TRUE;
        FILEOPEN                                : BOOL := TRUE;
        FILEREAD                                : BOOL := TRUE;
        FILECLOSE                       : BOOL := TRUE;
        fileRename                      : BOOL := FALSE;
        fileDelete                      : BOOL := TRUE;
        fileDirectory                   : BOOL := TRUE;
        unsolicitedStatus                       : BOOL := TRUE;
        informationReport                       : BOOL := TRUE;
        conclude                                : BOOL := TRUE;
        cancel                          : BOOL := TRUE;
END_STRUCT
END_TYPE
Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_ParameterSupportOptions

Parameters that will be negotiated between the two communication partners during the connection establishment (Association).

TYPE ST_MMS_ParameterSupportOptions:
STRUCT
        str1 : BOOL := TRUE;
        str2 : BOOL := TRUE;
        vnam : BOOL := TRUE;
        valt : BOOL := TRUE;
        vlis : BOOL := TRUE;
END_STRUCT
END_TYPE

str1: When this is set the device supports the Array-Type-Identifier for the type-description of the Array-Variables.

str2: When this is set the device supports the Structure-Type-Identifier for the type-description of the structured variable.

vnam: When this is set the device supports the named-access in variableSpecification.

valt: When this is set the device supports the so-called AlternateAccess. Indicated access to Array-Elements (INDEX or INDEX-RANGE).

vlis: When this is set the device supports the variableListName in variableAccessSpecification.

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_VMD

TYPE ST_MMS_VMD :
STRUCT
        vendorName      : T_MaxString := 'BECKHOFF';
        modelName       : T_MaxString := 'TwinCAT IEC 61850 Server';
        revision                : T_MaxString := '1.0.0';

        Associations    : ARRAY[1..MAX_MMS_APPLICATION_ASSOCIATIONS] OF ST_MMS_ApplicationAssociation;

        errors          : FB_MMS_ErrorFifo;

        nAllocLoad      : UDINT := 0;
END_STRUCT
END_TYPE

vendorName: VMD-Name of manufacturer.

modelName: VMD-Name of model.

revision: VMD-Version number as a String.

Associations: A list of the application-associations. An application-associations describes a client-server-connection (mapping). At the setting up of a new connection an unused array-element is assigned to the new connection. The application-association-structure variable provides status information of the association.

errors: Error-Fifo.

logs: Log-Fifo.

nAllocLoad: Percentage filling status of the MMS-object database.

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_ApplicationAssociation

TYPE ST_MMS_ApplicationAssociation :
STRUCT
        aaIdentifier    : UDINT := 0;
        authentPassword         : STRING(MAX_MMS_PASSWORD_LENGTH) := '';

        services                : ST_MMS_ServiceSupportOptions;
        parameters      : ST_MMS_ParameterSupportOptions;
        nestingLevel    : SINT := 0;

        bAuthentUser    : BOOL := FALSE;(* TRUE = User with authentication, FALSE = User without authentication *)
 eEnvironment    : E_MMS_Environment := eMMS_Environment_None;
END_STRUCT
END_TYPE

aaIdentifier: Application-Association-Identifier.

authentPassword: Authentication-password.

services: Supported MMS-services.

parameters: Supported MMS-CBB-parameters.

nestingLevel: max. interlacing-depth of the MMS-data structure.

bAuthentUser: This variable is set TRUE if you used an authentication-password at the build up of the application-association

eEnvironment: Status of the MMS- runtime environment.

Deveopment environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_MMS_DebugPara

TYPE ST_MMS_DebugPara :
STRUCT
        bError  : BOOL := FALSE; (* Enable/disable error messages. *)
        bLog    : BOOL := FALSE; (* Enable/disable log messages. *)

        mms     : ST_ProtocolDebugPara;
        ulosi   : ST_ProtocolDebugPara;
        cotp    : ST_ProtocolDebugPara;
END_STRUCT
END_TYPE

bError: Activates / deactivates the output of error messages in the TwinCAT System Manager logger-view-window.

bLog: Activates / deactivates the output of log messages (information, warnings) in the TwinCAT System Manager logger-view-window.

mms: This structure contains the configuration parameters for the debug output of the MMS-layer.

ulosi: This structure contains the configuration parameters for the debug outout of the upper-layer-OSI-layer (ACSI, Presentation, Session).

cotp: This structure contains the configuration parameters for the debug output of the transport-layer.

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE ST_ProtocolDebugPara

TYPE ST_ProtocolDebugPara:
STRUCT
        eTx : E_DbgDirection := eDbgDirection_OFF;(* Enable/disable debug output of data-requests. *)
 eRx : E_DbgDirection := eDbgDirection_OFF;(* Enable/disable debug output of data-indications. *)
 eCtrl : E_DbgDirection := eDbgDirection_OFF;(* Enable/disable debug output of connection control events/actions. *)
END_STRUCT
END_TYPE

eTx : Activates the output of the outgoing telegrams.

eRx : Activates the output of the incoming telegrams.

eCtrl :Activates the output of the control news.

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


TYPE E_COTP_DUsize

TYPE E_COTP_DUsize:
(
        eCOTP_DUsize_Unused := 0, (* *)
        eCOTP_DUsize_128 := 7, (* 128 byte (default) *)
        eCOTP_DUsize_256 := 8, (* 256 byte *)
        eCOTP_DUsize_512 := 9, (* 512 byte *)
        eCOTP_DUsize_1024 := 10, (* 1024 byte *)
        eCOTP_DUsize_2048 := 11, (* 2048 byte *)
        eCOTP_DUsize_4096 := 12 , (* 4096 byte *)
        eCOTP_DUsize_8192 := 13 , (* 8192 byte *)
        eCOTP_DUsize_16384 := 14, (* 16384 byte *)
        eCOTP_DUsize_32768 := 15 (* 32768 byte *)
);
END_TYPE

Larger data files will be segmented from the transport layer. This variable configures the maximum length of a data segment.

Development environment | Target system | PLC-libraries to be included
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcRFC1006.Lib


Constants

ACSI-Objectdatabase-Parameter

Constant | Value | Description
MAX_ACSI_OBJECTNODE_ALLOC | 30000 | Max. amount of the objects that are available
MAX_ACSI_OBJECTNAME_LENGTH | 31 | Max. Objectname-Stringlength (symbols)

Functional Constraints bit mask

All functional constraints of the basic norm IEC 61850 were implemented in the TwinCAT PLC as a constant of the ACSI Library.

ACSI_FC_ST :DWORD := 16#00000001; (* Status information (use of FC in the definition of DATA) *)
ACSI_FC_MX :DWORD := 16#00000002; (* Measurands (analogue values) (use of FC in the definition of DATA) *)
ACSI_FC_CO :DWORD := 16#00000004; (* Control (use of FC in the definition of DATA) *)
ACSI_FC_SP :DWORD := 16#00000008; (* Setpoint (use of FC in the definition of DATA and control blocks) *)
ACSI_FC_SV :DWORD := 16#00000010; (* Substitution (use of FC in the definition of DATA) *)
ACSI_FC_CF :DWORD := 16#00000020; (* Configuration (use of FC in the definition of DATA) *)
ACSI_FC_DC :DWORD := 16#00000040; (* Description (use of FC in the definition of DATA) *)
ACSI_FC_SG :DWORD := 16#00000080; (* Setting group (use of FC in the definition of DATA) *)
ACSI_FC_SE :DWORD := 16#00000100; (* Setting group editable (use of FC in the definition of DATA) *)
ACSI_FC_EX :DWORD := 16#00000200; (* Extended definition (use of FC in the definition of DATA) *)
ACSI_FC_BR :DWORD := 16#00000400; (* Buffered report (-> Reserved for control classes and use of the FC in the definition of control blocks) *)
ACSI_FC_RP :DWORD := 16#00000800; (* Unbuffered report (-> Reserved for control classes and use of the FC in the definition of control blocks) *)
ACSI_FC_LG :DWORD := 16#00001000; (* Logging (-> Reserved for control classes and use of the FC in the definition of control blocks) *)
ACSI_FC_GO :DWORD := 16#00002000; (* Goose control (-> Reserved for control classes and use of the FC in the definition of control blocks) *)
ACSI_FC_GS :DWORD := 16#00004000; (* Gsse control (-> Reserved FOR control classes AND use OF the FC in the definition OF control blocks) *)
ACSI_FC_MS :DWORD := 16#00008000; (* Multicast sampled value control (-> Reserved for control classes and use of the FC in the definition of control blocks) *)
ACSI_FC_US :DWORD := 16#00010000; (* Unicast sampled value control (-> Reserved for control classes and use of the FC in the definition of control blocks) *)
ACSI_FC_XX :DWORD := 16#00020000; (* Shall represent all DataAttributes of a Data of any FC. "XX" shall not used as value in DataAttributes *)

Trigger Options bit mask

      (* ACSI_TrgOp_rsv : DWORD := 16#80; reserved *)
ACSI_TrgOp_dchg : DWORD := 16#40;(* data-change *)
ACSI_TrgOp_qchg : DWORD := 16#20;(* quality-change *)
ACSI_TrgOp_dupd : DWORD := 16#10;(* data-update *)
ACSI_TrgOp_intg : DWORD := 16#08;(* integrity *)
ACSI_TrgOp_gi : DWORD := 16#04;(* general-interrogation *)

Develoment environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcACSI.Lib


Constants

Value | Value | Description
MAX_MMS_APPLICATION_ASSOCIATIONS | 1 | Maximum amount of coexistent activ Application-Associations.
MAX_MMS_PASSWORD_LENGTH | 10 | Maximum length of the authentification-password.
MAX_MMS_ACCESS_CONTROL_USERS | 4 | Maximum amount of the user account.

Development environment | Target system | PLC libraries to include
TwinCAT v2.10.0 Build >= 1340 | PC or CX (x86, ARM) | TcMMS.Lib


IEC61850 Sample Overview

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

Examples

The examples use the following Host-IP-address: "127.0.0.1" (Loopback-Adapter). The Host-address in the example project needs to be consistent with the address of the target system where the server should run. For example if you have a CX10xx with the IP-address "172.16.11.83" that should be the Server you need to configurate the IP-address in the example project of the CX10xx and download the project on this device. In the Client (control station) the address of the CX10xx needs to be entered as well as a host-address.

The maximum amount of nodes at an evaluation version is limited on 3.

Example | Description
IEC61850_Server.zip | A small IEC 61850 Demo-Server with the following nodes: LLN0, LPHD, MMXU, XCBR
IEC61400_25_Server.zip | An IEC 61400-25 Demo-Server with the following nodes: LLN0, LPHD, WCNV, WGEN, WNAC, WROT, WTUR, WYAW


TCP Keep-Alive Messages

A Keep-Alive Message is a confirmation message or an "acknowledge". Therewith you can proof in the backround if a communication partner who established a connection, is still active and therefore is participating in the communication. If the communication partner should not be active anymore, the communication channel will be closed clearly and regular, to be free for a new attendant.

Keep-Alive can be configurated in the registration by the keys Keep-Alive-Time and Keep-Alive-Interval. The default value for the Keep-Alive-Time is set on two hours. The interval-time is set by default to one second. This is the time until there is a repetition of a not-answered Alive-request. All values are stated in milliseconds. If the corresponding key is not listed in the registration they need to be applied as follows. These are no TwinCAT-settings but specific settings of the operating system. Therefore you will find further information in the operating system documentation, e.g. at the Microsoft homepage.

Under Windows W2K, XP, Windows Embedded Standard:

  • In the folder HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ an object with the name KeepAliveTime needs to be applied as DWORD. Therefore you need to insert under Edit -> New -> DWORD Value. If you set it to the value 0x4E20, this equates 20 seconds.
  • In the folder HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ an object with the name KeepAliveInterval needs to be applied as DWORD. Therefore you need to insert under Edit -> New -> DWORD Value. If you set it to the value 0x1388, this equates 5 seconds.

Under Windows CE:

  • In the folder HKEY_LOCAL_MACHINE\Comm\TcpIp\Parms\ an object with the name KeepAliveTime needs to be applied as DWORD. Therefore you need to insert under Edit -> New -> DWORD Value. If you set it to the value 0x4E20, this equates 20 seconds.
  • In the folder HKEY_LOCAL_MACHINE\Comm\TcpIp\Parms\ an object with the name KeepAliveInterval needs to be applied as DWORD. Therefore you need to insert under Edit -> New -> DWORD Value. If you set it to the value 0x1388, this equates 5 seconds.


IEC61850 FAQ

TS6509 / TS6511 | TwinCAT PLC Lib: IEC 61400-25 Server und IEC 61850 Server

FAQ - Frequently asked questions

In this area frequently asked questions will be answered to help you to work with TwinCAT IEC 61850.
If you have any further questions please contact our support (Hotline +49(0)5246/963-157).

1. Is it possible to apply my own Logical Nodes and Common Data Classes?

2. Is it possible to extend the existing standard Logical Nodes and Common Data Classes?

3. Which PLC library needs to be included for the communication stack in TwinCAT PLC Control?

1.
? Is it possible to apply my own Logical Nodes and Common Data Classes ?
 ! Yes, this is possible in the Telecontrol Configurator. By the usage of the configurator the own definitions will be written in an "own" XML database. The corresponding objects are available for each new configuration in the configurator. You will find futher information under Private Logical Nodes and Private Common Data Classes.

2.
? Is it possible to extend the existing standard Logical Nodes and Common Data Classes ?
 ! Yes, extensions are possible. But it is not possible to take the name of the original and the extension can only be saved in the "private" XML database. How this works you will see under Private Logical Nodes and Private Common Data Classes.

3.
? Which PLC library needs to be included for the communication stack in TwinCAT PLC Control?
 ! After a successfull installation the TcIEC61850Server.lib needs to be embedded into the TwinCAT PLC Control project out of the TwinCAT library register.


IEC61850_ConfiguratorDataSetsOverview

TwinCAT PLC Library: IEC 61850/61400-25

DataSets

DataSets can be generated out of the context menu as you can see in the picture below. Because the DataSets will be allocated to the Logical Nodes the corresponding context menu entry is only available at the selected Logical Node. After that a dialog opens where you can enter the name of the DataSet. After you have confirmed the dialog the DataSet will be listed in the DataSetlist (see second picture).

When you choose a DataSet out of the DataSetlist all the DataAttributes and Functional Constrains that are belonging to the DataSet will be shown in the window on the right side.

In the DataSetlist all DataSets with the corresponding reference and the amount of the attached elements will be shown. In the context menu you have the opportunity to change the DataSetname or to delete the DataSets.


IEC61850_ConfiguratorReportingOverview

TwinCAT PLC Library: IEC 61850/61400-25

Reporting

Reporting blocks can be created out of the context menu as it is shown in the picture below. You have the possibility to create "bufferd" or "unbufferd" reporting blocks. Because the reporting blocks are allocated to the Logical Nodes the corresponding context menu entry only is available at the selected Logical Node. After that a dialog opens where you can enter the name of the reporting block. After you have confirmed the dialog the reporting block will be attached to the Logical Node and will be listed in the reporting list (see second picture).

It is possible to link the reporting blocks with a DataSet in the reporting list. The reference of the DataSet will be written into the attribute "DataSet" of the reporting block. Furthermore you have the possibility to rename or to delete the reporting block.

If you select a reporting block out of the reporting list the DataAttributes of the reporting block will be shown in the window on the right side.