IEC 60870-5-104 controlled station (slave)

Simple substation application using the TwinCAT IEC 60870-5-104 low-level interface. This sample application can communicate with a central station via a network interface.

Download TwinCAT XAE Project (*.zip): LowLevelSlaveSample104.zip

In the sample project, the following station parameters are set for the substation:

Data point configuration (it should be the same as the data point configuration of the central station):

Sample implementation of the following services:

The following table briefly describes the main components of the project:

Component

Type

Description

MAIN

PRG

This program part implements the telecontrol protocol.

fbServer

FB_IEC870_5_104S (FB)

Implements the substation. An instance of this function block can only communicate with one central station. For each additional central station to communicate with, another instance of this function block is required.

fbServices

FB_IEC870_5_104SServices ( FB)

Includes a simple implementation of some services such as general interrogation, clock synchronization, test commands, etc.

stProcPara

ST_IEC870_5_104SProcData (STRUCT)

Here you can found constantly updated process data – either received or to be sent.

sysPara

ST_IEC870_5_104SSysPara (STRUCT)

Configuration of the system parameters of the substation and the implemented services.

fbLog

FB_IEC870_DebugLogFifo (FB)

A simple log buffer for debugging/troubleshooting purposes.