TcIEC870_5_104Slave: IEC 60870-5-104 Controlled Station (slave)
Substations (Slaves) according to IEC60870-5-104 can be realised in TwinCAT PLC with 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-104 Controlled 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-104 Transport 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 synchronization, 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-104 controlled 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.9.0 Build >= 1030 (CX (ARM) Build >= 1301) 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) (image v1.75 or higher);
- Windows CE (ARM): CE (image v2.13 or higher);
- TwinCAT PLC runtime system version 2.9.0 or higher;
Product components
- TcIEC870_5_104Slave.Lib (implements the Beckhoff IEC60870-5-104 substation). This library have to be included in the PLC project. All other libraries are included automatically.
- TcIEC870_5_104.Lib (implements the transfer protocol according to IEC60870-5-104);
- TcIEC870_5_101.Lib (implements the connection functions and common data types);
- TcSocketHelper.Lib (TCP/IP help funtions);
- TcpIp.Lib (TCP/IP base functions);
- TwinCAT TCP/IP Connection Server;
Installation on Windows NT (XP, XPe/WES, Vista, W7, WES7, ...)
The PLC libraries are copied into ..\TwinCAT\Plc\Lib folder. The TwinCAT TCP/IP Connection Server is entered in the TwinCAT Server list. The TCP/IP Connection Server is automatically started when TwinCAT is started and stopped when TwinCAT is stopped.
Installation on Windows CE
Product version for the runtime system under Windows CE is available as separate product. If you have CE version, please do the following steps:
- Install the product on your programming PC. The PLC libraries are copied into ..\TwinCAT\Plc\Lib folder.
- X86 CPU (CX1000, CX1020, PC)
- The folder ...\TwinCAT\CE\TCPIP\Install\ contains a Cabinet-File for the CE runtime system.
- Copy the file: TcTCPIPSvrCe.I586.CAB in a folder of the CE runtime system.
- ARM CPU (CX9000), TwinCAT PLC Library: IEC 60870-5-104 controlled station (slave) v2.0.4 or higher:
- The folder ...\TwinCAT\CE\TCPIP\Install\ contains a Cabinet-File for the CE runtime system.
- Copy the file: TcTCPIPSvrCe.ARMV4I.CAB in a folder of the CE runtime system.
- On CE system: Install (double click to Cabinet-File) CE components.
- Please suspend the CE device once after installation via "Start-> Suspend". The TwinCAT TCP/IP Connection Server starts with CE operating system.
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 Web-Server: http://www.beckhoff.com under download.
Examples
Example projects are in the Beckhoff Information System documentation of TwinCAT PLC library.
Link to 'high level' example overview page: IEC 60870-5-104 Controlled Station;
Link to 'low level' example overview page: IEC 60870-5-104 Transport Interface;
Further Documentation
- Documentation of TwinCAT PLC Library ('low level' interface): IEC 60870-5-104 Transport Interface;
- Documentation of TwinCAT PLC Library: IEC 60870-5-101 Common Data Types;
- Documentation: TwinCAT TCP/IP Connection Server;
- IEC 60870-5-1 Transmisstion 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;
- IEC 60870-5-104:2000 Network access for IEC 60870-5-101 using standard transport profiles;