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 & Co. KG, Germany.
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 control stations (masters) according to IEC60870-5-101 can be realised in the TwinCAT PLC with the PLC functions and function blocks.

The PLC library has two software interfaces. The end application is imposed on one of these interfaces. The choice of interface depends on the requirements for the end application. The characteristics of both interfaces are described briefly below.

‘High level’ interface: IEC 60870-5-101 Control Station

This interface is a so-called ‘single-block solution’. All functions are encapsulated in one PLC block. The block implements the most important services and functions. This implementation is sufficient for over 90% of applications.

Pro: Very little PLC programming work is required in order to create an application; all services, such as general query, counter query, time synchronisation, command execution, spontaneous data transmission etc. are already implemented in the block and are executed automatically; the mapping of the IEC<->PLC process data and that of the data points is configured via function calls; the PLC programmer does not need to be very well acquainted with the protocol standard;

Contra: The PLC application has only a small influence on the execution of the protocol; no influence on the execution of the services – these are automatically implemented internally; time stamps are automatically generated by the block and cannot be changed (handed over by externals); only the direct command execution, for example, is possible; poorer performance if there are many data points.

This interface is recommended if you:

  • are not familiar with the protocol standard;
  • are implementing a simple application with few data points (<1000);
  • are not placing any great performance demands on the application;
  • are not sending any special command execution such as Select/Execute or data + time stamp from external devices;
  • do not require any functions that are not supported according to the compatibility list;

‘Low level’ interface: IEC 60870-5-101 Serial Link Interface

This interface starts lower down on the protocol stack and enables the sending and/or receipt of individual frames (ASDUs).

Pro: Very flexible; all properties in the ASDU frame can be changed (e.g. an own time stamp, Select/Execute or a special command execution etc.); high performance can be achieved because only the necessary services are implemented; high performance if there are many data points;

Contra: Larger amount of programming work; all services, such as general query, counter query, time synchronisation, command execution, spontaneous data transmission etc. must be implemented by the PLC programmer himself (programmed out); the PLC programmer must be familiar with the protocol standard.

This interface is recommended if you:

  • are familiar with the protocol standard;
  • are implementing a protocol converter application;
  • are implementing virtually all available standard functions in the application;
  • are using special functions, such as the relaying of the time stamp from a Modbus device or the gaining of control over the command execution;
  • require functions that are not supported according to the compatibility list;
  • have many data points (>1000) and need high performance;

Interoperability check list

for TwinCAT PLC Library: IEC 60870-5-101 control station (relating to the "high level" interface). Here you can open/save the protocol interoperability document (zipped PDF).

System requirements

  • Development environment:
    • Windows NT (XP, XPe/WES, Vista, W7, WES7, ...);
    • TwinCAT installation level:TwinCAT PLC or higher;
    • TwinCAT System version 2.10.0 Build >= 1328 or higher;
  • Target system:
    • Industrial PC or Embedded PC/CX (x86, ARM);
    • Operating system:
      • Windows NT (XP, XPe/WES, Vista, W7, WES7, ...);
      • Windows CE (x86, ARM) (image v2.16 or higher);
    • TwinCAT PLC runtime system version 2.10.0 or higher;
    • Serial COM port or KL6xxx or EL6xxx bus terminal (EL6xxx support implemented in product version 1.0.3 and higher);

Product components

  • TcIEC870_5_101Master.Lib (implements the Beckhoff IEC60870-5-101 controlling station). This library have to be included in the PLC project. All other libraries are included automatically.
  • TcIEC870_5_101Link.Lib (base library, implements the transfer procedures for the transport of ASDU's via the serial interfaces of PC and Beckhoff KL6xxx- or EL6xxx bus terminal);
  • TcIEC870_5_101.Lib (implements the connection functions and common data types);
  • COMLibV2.Lib (implements the functions for the serial COM- or KL6xxx- or EL6xxx communication);

Installation

Windows NT (XP, XPe/WES, Vista, W7, WES7, ...)

The PLC libraries are copied into the folder: ..\TwinCAT\Plc\Lib.

Windows CE

You don't have to install any additional components on the CE platform.

Hint: This document is not full product manual. Please install the full version of the Beckhoff Information System.

You will find it

  • on the Beckhoff Product DVDs
  • on our FTP-Server: http://download.beckhoff.com/download/Software/TwinCAT/TwinCAT2/InfoSystem/All/Install/InfoSys.exe
  • on our Web-Server: http://www.beckhoff.com

Examples

Example projects are located in the documentation of TwinCAT PLC library (Beckhoff Information System required).

Link to 'high level' example overview page: IEC 60870-5-101 Control Station;

Link to 'low level' example overview page: IEC 60870-5-101 Serial Link Interface;

Further Documentation

  • Documentation of TwinCAT PLC Library ('high level' interface): IEC 60870-5-101 Control Station;
  • Documentation of TwinCAT PLC Library ('low level' interface): IEC 60870-5-101 Serial Link Interface;
  • Documentation of TwinCAT PLC Library: IEC 60870-5-101 Common Data Types;
  • Documentation of TwinCAT PLC Library: Serial communication;
  • IEC 60870-5-1 Transmission frame formats;
  • IEC 60870-5-2 Link transmission procedures;
  • IEC 60870-5-3 General structure of application data;
  • IEC 60870-5-4 Definition and coding of application information elements;
  • IEC 60870-5-5 Basic application functions;
  • IEC 60870-5-101 Companion Standard for basic telecontrol tasks;
  • IEC 60870-5-101:1995/A1:2000 Companion Standard for basic telecontrol tasks. Amendment 1;
  • IEC 60870-5-101:1995/A2:2001 Companion Standard for basic telecontrol tasks. Amendment 2;